My question is simple: How can I do multi-targeting in command line compiler (csc.exe), especially to .Net 4 Client Profile?
edit: Ok, Is my que
TargetFramework can be configured in the Project file only and can't be passed as a switch to CSC.exe, see settings for TargetFrameworkVersion and TargetFrameworkProfile in below example
So the only way to dynamically set is to modify the project file with below setting and compile with csc.exe if you want to set Client Profile
Targetting .NET Framework 4.0 Client Profile
Debug
AnyCPU
{A5F58561-47CA-482A-83E0-1D43C312B0A7}
Exe
Properties
ConsoleApplication1
ConsoleApplication1
v4.0
512
Client
Targetting .NET Framework 4.0
Debug
AnyCPU
{A5F58561-47CA-482A-83E0-1D43C312B0A7}
Exe
Properties
ConsoleApplication1
ConsoleApplication1
v4.0
512