问题
I'm working on a project that is pretty simple, but the most recent version of VB.NET that I have is 4.0.
That means, anything I compile, requires that version of the .NET framework. Is there any way to compile with an older version of the framework, or get it to require an older version?
I'm sorry if this is a little hard to understand. TO sum it up, I don't want to make everyone upgrade to .Net 4.0 framework, if they already have 1.0, 2.0, 3.5, etc. installed already...
回答1:
The solution is easy. Open your project in Visual Studio, go to your project in the solution explorer - right click and select "properties", there you need to go to the "Compile" side-tab, and click "Advanced Compile Options", down below you can select the target framework. I think if you use 4.0 libraries it will mark them out as an error, so you can remove them or modify them to fit the framework you want.
来源:https://stackoverflow.com/questions/6299492/lowering-dependancy-version-of-compile-vb-net