Re: nant multitarget support?
Bevan Arps <[email protected]> Sun, 09 Sep 2012 21:52:28 +1200
| Newsgroups | gmane.comp.windows.dotnet.nant.user |
|---|---|
| Message-ID | <[email protected]> |
--===============8898923173347188801== Content-type: multipart/alternative; boundary=_C127EA0B-7014-B200-7F59-D781BD3BAAC1_ --_C127EA0B-7014-B200-7F59-D781BD3BAAC1_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" Fwiw, I've found the <csc> task too limiting.=20 Instead I use <exec> to run msbuild for either the whole solution or a spec= ific project. This approach handles your scenario of using the C# 4.0 compi= ler to target .Net 3.5. Keep smiling Bevan. =20 -----Original Message----- From: Stefan Arn Sent: 9/5/2012 9:18 PM To: '[email protected]' Subject: [NAnt-users] nant multitarget support? I have C# code with 4.0 language features that need a C#4.0 compiler to com= pile. But the resulting code should run on .NET Framework 3.5. This is poss= ible 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 alre= ady tried to change the framework configuration in NAnt.exe.config without = success. I also looked around for an option to specify the compiler exe fil= e on the csc NAnt task. What should I do? Any suggestions? --_C127EA0B-7014-B200-7F59-D781BD3BAAC1_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="us-ascii" <html xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:v =3D "urn:schemas-mi= crosoft-com:vml" xmlns:o =3D "urn:schemas-microsoft-com:office:office" xmln= s:w =3D "urn:schemas-microsoft-com:office:word" xmlns:m =3D "http://schemas= .microsoft.com/office/2004/12/omml"><head><meta content=3D"text/html; chars= et=3Dus-ascii" http-equiv=3D"Content-Type"><meta name=3D"Generator" content= =3D"Microsoft Word 14 (filtered medium)"><style><!--=0A= /* Font Definitions */=0A= @font-face=0A= {font-family:"Cambria Math";=0A= panose-1:2 4 5 3 5 4 6 3 2 4;}=0A= @font-face=0A= {font-family:Calibri;=0A= panose-1:2 15 5 2 2 2 4 3 2 4;}=0A= @font-face=0A= {font-family:Tahoma;=0A= panose-1:2 11 6 4 3 5 4 4 2 4;}=0A= /* Style Definitions */=0A= p.MsoNormal, li.MsoNormal, div.MsoNormal=0A= {margin:0cm;=0A= margin-bottom:.0001pt;=0A= font-size:11.0pt;=0A= font-family:"Calibri","sans-serif";}=0A= a:link, span.MsoHyperlink=0A= {mso-style-priority:99;=0A= color:blue;=0A= text-decoration:underline;}=0A= a:visited, span.MsoHyperlinkFollowed=0A= {mso-style-priority:99;=0A= color:purple;=0A= text-decoration:underline;}=0A= p.MsoAcetate, li.MsoAcetate, div.MsoAcetate=0A= {mso-style-priority:99;=0A= mso-style-link:"Sprechblasentext Zchn";=0A= margin:0cm;=0A= margin-bottom:.0001pt;=0A= font-size:8.0pt;=0A= font-family:"Tahoma","sans-serif";}=0A= span.E-MailFormatvorlage17=0A= {mso-style-type:personal-compose;=0A= font-family:"Calibri","sans-serif";=0A= color:windowtext;}=0A= span.SprechblasentextZchn=0A= {mso-style-name:"Sprechblasentext Zchn";=0A= mso-style-priority:99;=0A= mso-style-link:Sprechblasentext;=0A= font-family:"Tahoma","sans-serif";}=0A= .MsoChpDefault=0A= {mso-style-type:export-only;=0A= font-family:"Calibri","sans-serif";}=0A= @page WordSection1=0A= {size:612.0pt 792.0pt;=0A= margin:70.85pt 70.85pt 2.0cm 70.85pt;}=0A= div.WordSection1=0A= {page:WordSection1;}=0A= --></style></head><body lang=3D"DE-CH" vLink=3D"purple" link=3D"blue"><div>= <div style=3D"font-family: Calibri,sans-serif; font-size: 11pt;">Fwiw, I've= found the <csc> task too limiting. <br><br>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.<br><br>Keep smiling<br>Bevan.<br> <br></div></div><hr><span style=3D"f= ont-family: Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">From: <= /span><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">Stef= an Arn</span><br><span style=3D"font-family: Tahoma,sans-serif; font-size: = 10pt; font-weight: bold;">Sent: </span><span style=3D"font-family: Tahoma,s= ans-serif; font-size: 10pt;">9/5/2012 9:18 PM</span><br><span style=3D"font= -family: Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">To: </span= ><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">'nant-use= [email protected]'</span><br><span style=3D"font-family: Tahoma,sans= -serif; font-size: 10pt; font-weight: bold;">Subject: </span><span style=3D= "font-family: Tahoma,sans-serif; font-size: 10pt;">[NAnt-users] nant multit= arget support?</span><br><br><div class=3D"WordSection1"><p class=3D"MsoNor= mal">I have C# code with 4.0 language features that need a C#4.0 compiler t= o 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 h= ad no luck with NAnt.<o:p></o:p></p><p class=3D"MsoNormal"><o:p> </o:p= ></p><p class=3D"MsoNormal">Is it possible to use the 4.0 compiler and targ= et 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.<o:p></o:p></p><p class= =3D"MsoNormal"><o:p> </o:p></p><p class=3D"MsoNormal">What should I do= ? Any suggestions?<o:p></o:p></p></div></body></html>= --_C127EA0B-7014-B200-7F59-D781BD3BAAC1_-- --===============8898923173347188801== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ 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/ --===============8898923173347188801== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ NAnt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nant-users --===============8898923173347188801==--