.net framework compatibility questions

后端 未结 2 608
北恋
北恋 2021-01-29 03:39

I am newbie to the .NET Framework. I have some a question about .NET program execution.

If I am developing a .NET application using .NET Framework version 4.0, can that

相关标签:
2条回答
  • 2021-01-29 04:32

    No, you cannot reference a DLL compiled in .NET 4.0 from a program compiled in .NET 3.5. .NET Framework applications are usually backward compatible -- that is, you can reference a .NET 3.5 assembly from .NET 4.0 code, but the reverse is not true.

    You could try compiling the .NET 3.5 project in 4.0, or compiling the .NET 4.0 assembly in .NET 3.5, either of which will work if they are an option.

    0 讨论(0)
  • 2021-01-29 04:43

    .Net Framework is generally backward compatible, so you can load a .Net 3.5 assembly in a .Net 4 runtime, but not vice-versa.

    You should target your assemblies at the lowest supported version of the runtime.

    Here is some additional reading that should answer most of your questions...

    https://msdn.microsoft.com/en-us/library/ff602939(v=vs.110).aspx

    0 讨论(0)
提交回复
热议问题