简体   繁体   English

开发.NET 3.5 DLL将其加载到4.0项目中 - 这会导致问题吗?

[英]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. 我正在开发一个由.NET 4.0应用程序加载的Arctools .NET 3.5 C#DLL。 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. 我们在.NET v2.0上用c#编写了几个DLL,并且没有任何问题地部署到v3.5。 The same has played out for v3.5 to v4.0. 同样适用于v3.5到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. .NET中的并行执行与编译时存储在DLL中的v3.5信息相结合,可以实现这一点。 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. 您应该始终在测试环境中尝试它,以确保您的v3.5 DLL不会调用任何破坏了v4.0更改的obselete API。 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. 如果您的v3.5 DLL我们使用pinvoke或其他类似的方法直接调用Windows API,您可能希望在那里运行特定的测试以确保它们仍然按预期工作。

Simple answer is no. 简单的答案是否定的。

.NET 4 will use past versions of DLLs with no problem. .NET 4将使用过去版本的DLL没有问题。 Just add a reference to it and you're off to the races :) 只需添加对它的引用,你即可参加比赛:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM