What does it really mean to target a framework, and how do I maximize compatibility?

后端 未结 4 1312
花落未央
花落未央 2020-12-25 09:59

Greetings all,

This has confused me ever since I first started coding in C#. My goal is to create an assembly that will run on the most recent .NET framework the us

4条回答
  •  生来不讨喜
    2020-12-25 10:42

    I believe this is supposed to be whatever version you select and upwards. So if you target 2.0 framework, it should work if client has 2.0, 3.0, 3.5, or 4.0 frameworks installed.

    You are also selecting language features when you pick this, so I know of no way that you would be able to use 4.0 framework features using an application targeting 2.0 framework. Even dynamically loading assemblies doesn't work, try loading a dll compiled to 4.0 from a 2.0 application, it won't let you.

提交回复
热议问题