Develop a .NET 3.5 dll load it into a 4.0 project - will this cause problems?
I am developing an Arctools .NET 3.5 C# DLL to开发者_运维百科 be loaded by a .NET 4.0 application. Will this cause problems?
Yes that should work just fine.
We had several DLLs written in c# on .NET v2.0 and deployed to v3.5 without any issues. The same has played out for v3.5 to v4.0. The side-by-side execution in .NET combined with the v3.5 information stored within your DLL when it compiles is what enables this to happen. You should always try it anyway in a test environment to ensure your v3.5 DLL is not calling into any obselete APIs that are breaking changes with v4.0. If your v3.5 DLL us using pinvoke or other similar methods to call into the Windows API directly, you may want to run specific tests there to ensure those still work as expected.
Simple answer is no.
.NET 4 will use past versions of DLLs with no problem. Just add a reference to it and you're off to the races :)
精彩评论