Fwiw, I've found the <csc> task too limiting. 

Instead I use <exec> to run msbuild for either the whole solution or a specific 
project. This approach handles your scenario of using the C# 4.0 compiler to 
target .Net 3.5.

Keep smiling

-----Original Message-----
From: Stefan Arn
Sent: 9/5/2012 9:18 PM
To: 'nant-users@lists.sourceforge.net'
Subject: [NAnt-users] nant multitarget support?

I have C# code with 4.0 language features that need a C#4.0 compiler to 
compile. But the resulting code should run on .NET Framework 3.5. This is 
possible with VS2010 by simply selecting the target framework 3.5. But I had no 
luck with NAnt.

Is it possible to use the 4.0 compiler and target the 3.5 framework? I already 
tried to change the framework configuration in NAnt.exe.config without success. 
I also looked around for an option to specify the compiler exe file on the csc 
NAnt task.

What should I do? Any suggestions?
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
NAnt-users mailing list

Reply via email to