开发者

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

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 force a new version of the .Net framework and CLR on my client base.

Before the naysayers 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 co开发者_如何学Gompilers at this point.


Which version of NAnt are you using?

I recall that NAnt 0.85 didn't ship with .NET 3.5 support, you had to add that support by editing a NAnt config file. The same has to be done for .NET 4 support, even in the current NAnt.

There's some discussion on the matter, the link points to the solution.

Incidentally, the NAnt team are working on a .90 update release, and are looking to have .NET 4 support in 0.91.


The NAnt team has just release NAnt 0.91 Alpha 1, with .NET 4.0 support (experimental). Please download to test and provide your valuable feedback to the team.

Thanks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜