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
If you need to compile at runtime, then you should consider the providers in System.CodeDOM, which allow compilation without invoking a separate process.
To answer your original question, if you turn the MSBuild verbosity to Detailed in Visual Studio (Options - Projects and Solutions - Build and Run) and build a project targeted at client profile, you will see this in the build output:
Csc.exe (stuff...) Program.cs Properties\AssemblyInfo.cs "C:\...\Temp\.NETFramework,Version=v4.0,Profile=Client.AssemblyAttributes.cs"
The path in quotes is actually a generated temp file, containing:
[assembly: TargetFrameworkAttribute(".NETFramework,Version=v4.0,Profile=Client", FrameworkDisplayName = ".NET Framework 4 Client Profile")]
So, you should be able to use that attribute in your own code if you are invoking csc directly.