Before, I was using VS 2008 command prompt and when I do
clrver
I got
Versions installed on the machine:
v1.1.4322
v2.0.50727
Now with Visual Studio 2010 command prompt I get :
Versions installed on the machine:
v1.1.4322
v2.0.50727
v4.0.30319
I want to know if there is a way to compile my C# code with the VS 2010 command line using the Framework 2.0 and not 4.0
-- Edit --
Is there another way than going in the properties of the project?
Use MSBuild command line and pass the ToolsVersion (2.0,3.0,3.5,4.0) and TargetFrameworkVersion (v2.0,v3.0,v3.5,v4.0) properties:
msbuild your.sln /p:TargetFrameworkVersion=v2.0;ToolsVersion=3.5
The UI option is described here.
You can change the targeted framework in your project settings.
http://msdn.microsoft.com/en-us/library/bb398202.aspx
(I do not yet have VS 2010 on my work machine, so I can't test whether or not support extends to .NET 2.0, though I believe it does)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With