How do I get Nant to use the 4.0 compiler to target .Net 3.5

Posted by Rory Becker on Stack Overflow See other posts from Stack Overflow or by Rory Becker
Published on 2010-04-13T08:54:37Z Indexed on 2010/04/20 10:13 UTC
Read the original article Hit count: 485

Filed under:
|
|
|

Yes I know that sounds a little bit crazy, but I've got .Net 3.5 deployed in the field and I'd like to use the new 4.0 compiler to target it.

There are several new syntactic sugar features in the latest versions of Vb.Net and C# which I would like to use,but I am unable (just yet) to enforce a new version of the .Net framework and CLR on my client base.

Before the nay sayers jump in with both feet... I have just successfully used Studio 2010 to compile a 3.5 targeted app which used VB.Net auto properties (A new feature in VB.Net 10) so I know the compilers are capable somehow.

So back to my question.... How do I convince Nant to use the 4.0 compiler, but to target .Net 3.5 (CLR 2.0)

Update: I am using the csc and vbc tasks and not the Solution task. although I'd settle for an answer on how to do this direct with the compilers at this point.

© Stack Overflow or respective owner

Related posts about nant

Related posts about .NET