Re: 0.92 Beta 1 release not compiled with NET_4_0 define
Peter McEvoy <[email protected]> Mon, 14 May 2012 18:11:31 +0100
| Newsgroups | gmane.comp.windows.dotnet.nant.user |
|---|---|
| Message-ID | <CAEs-SiLPk6axMY1jqOMHxOANa54YOyosuyohzDhKQtLmzN1vHg@mail.gmail.com> |
--===============5707207710551839569== Content-Type: multipart/alternative; boundary=047d7b15fe0b72d6ee04c0022d5a --047d7b15fe0b72d6ee04c0022d5a Content-Type: text/plain; charset=ISO-8859-1 Thanks for quick feedback. Running out the door now, so will add in the morning if that is OK. Cheers Pete On 14 May 2012 18:07, Ryan Boggs <[email protected]> wrote: > Hi Peter, > That preprocessing statement was added during the 0.91 release phase, when > NAnt was still using the .NET 1.0 runtime by default. We were having > issues between .NET 1.0 and 4.0, which is why that statement is there. I > just took a look at the .NET docs and the AppDomain.CreateDomain method you > mentioned was actually created in .NET 2.0 (my fault for thinking it was > added in .NET 4.0). Based on my findings and the fact that we are now > building NAnt/NAntContrib on .NET 2.0 runtime (as of 0.92 Alpha1), we can > just eliminate that preprocessing statement altogether and just use the > AppDomain.CreateDomain method with the PermissionSet as standard without > issues. It'll need testing, of course. > > Would you mind adding this to our issues list for tracking purposes? I'll > see if I can get to this within the next couple of days. > https://github.com/nant/nant/issues > > Thanks, > Ryan > > On Mon, May 14, 2012 at 9:34 AM, Peter McEvoy <[email protected]>wrote: > >> Hi there, >> I've been trying to use the nunit2 task to unit test some MVC controllers >> and have been seeing the following exception: >> >> [nunit2] 21) >> Otu.Web.UnitTests.Controllers.RegistrationControllerUnitTests.Execute_should_return_registration_complete_view_when_registration_is_in_session >> : SetUp : System.InvalidOperationException : Dynamic operations can only be >> performed in homogenous AppDomain. >> >> Investigating a little further, it seems that the task should be creating >> Homogenous AppDomains when running test assemblies that may be using DLR >> features. >> >> Looking at the source, it seems that someone did think of this, but the >> code is #if'd out, and that code does not appear in the download binaries : >> >> #if NET_4_0 >> PermissionSet myDomainPermSet = new >> PermissionSet(PermissionState.Unrestricted); >> return AppDomain.CreateDomain(domSetup.ApplicationName, >> AppDomain.CurrentDomain.Evidence, domSetup, myDomainPermSet); >> #else >> >> >> I realize that 4.0 specific code may not be to everyone's taste, but >> perhaps there could be a side-by-side release of a .Net 4.0 binary build? >> (I'd really prefer to be using "blessed" releases rather than baking my >> own) >> >> >> Pete >> >> -- >> <http://www.fsf.org/fb> >> http://www.fsf.org/facebook >> http://bit.ly/hzA1MS >> http://bit.ly/fztcGn >> http://cli.gs/V1UtWw >> http://cli.gs/S3zVIt >> http://goo.gl/ZBptR >> http://goo.gl/tXFO7 <http://goo.gl/ZBptR> >> >> >> >> >> ------------------------------------------------------------------------------ >> 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 >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/nant-users >> >> > -- <http://www.fsf.org/fb> http://www.fsf.org/facebook http://bit.ly/hzA1MS http://bit.ly/fztcGn http://cli.gs/V1UtWw http://cli.gs/S3zVIt http://goo.gl/ZBptR http://goo.gl/tXFO7 <http://goo.gl/ZBptR> --047d7b15fe0b72d6ee04c0022d5a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for quick feedback. =A0Running out the door now, so will add in the = morning if that is OK.<div><br></div><div>Cheers</div><div>Pete<br><br><div= class=3D"gmail_quote">On 14 May 2012 18:07, Ryan Boggs <span dir=3D"ltr">&= lt;<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]= </a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Hi Peter,<br>That preprocessing statement wa= s added during the 0.91 release phase, when NAnt was still using the .NET 1= .0 runtime by default.=A0 We were having issues between .NET 1.0 and 4.0, w= hich is why that statement is there.=A0 I just took a look at the .NET docs= and the AppDomain.CreateDomain method you mentioned was actually created i= n .NET 2.0 (my fault for thinking it was added in .NET 4.0).=A0 Based on my= findings and the fact that we are now building NAnt/NAntContrib on .NET 2.= 0 runtime (as of 0.92 Alpha1), we can just eliminate that preprocessing sta= tement altogether and just use the AppDomain.CreateDomain method with the P= ermissionSet as standard without issues.=A0 It'll need testing, of cour= se.<br> <br>Would you mind adding this to our issues list for tracking purposes?=A0= I'll see if I can get to this within the next couple of days.<br><a hr= ef=3D"https://github.com/nant/nant/issues" target=3D"_blank">https://github= .com/nant/nant/issues</a><br> <br>Thanks,<br>Ryan<br><br><div class=3D"gmail_quote"><div><div class=3D"h5= ">On Mon, May 14, 2012 at 9:34 AM, Peter McEvoy <span dir=3D"ltr"><<a hr= ef=3D"mailto:[email protected]" target=3D"_blank">peter.m.mcevoy@gma= il.com</a>></span> wrote:<br> </div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo= rder-left:1px #ccc solid;padding-left:1ex"><div><div class=3D"h5">Hi there,= <div>I've been trying to use the nunit2 task to unit test some MVC cont= rollers and have been seeing the following exception:</div> <div><br></div><div><div>=A0 [nunit2] 21) Otu.Web.UnitTests.Controllers.Reg= istrationControllerUnitTests.Execute_should_return_registration_complete_vi= ew_when_registration_is_in_session : SetUp : System.InvalidOperationExcepti= on=A0: Dynamic operations can only be performed in homogenous AppDomain.</d= iv> </div><div><br></div><div>Investigating a little further, it seems that the= task should be creating Homogenous AppDomains when running test assemblies= that may be using DLR features.</div><div><br></div><div>Looking at the so= urce, it seems =A0that someone did think of this, but the code is #if'd= out, and that code does not appear in the download binaries :</div> <div><br></div><div><div>#if NET_4_0</div><div>=A0 =A0 =A0 =A0 =A0 =A0 Perm= issionSet myDomainPermSet =3D new PermissionSet(PermissionState.Unrestricte= d);</div><div>=A0 =A0 =A0 =A0 =A0 =A0 return AppDomain.CreateDomain(domSetu= p.ApplicationName, AppDomain.CurrentDomain.Evidence, domSetup, myDomainPerm= Set);</div> <div>#else</div></div><div><br></div><div><br></div><div>I=A0realize=A0that= 4.0 specific code may not be to everyone's taste, but perhaps there co= uld be a side-by-side release of a .Net 4.0 binary build? =A0(I'd reall= y prefer to be using "blessed" releases rather than baking my own= )</div> <div><br></div><div><br></div><div>Pete<span><font color=3D"#888888"><br cl= ear=3D"all"><div><br></div>-- <br><a href=3D"http://www.fsf.org/fb" target= =3D"_blank"><img height=3D"66" width=3D"200"></a><br><div><a href=3D"http:/= /www.fsf.org/facebook" target=3D"_blank"><font size=3D"1">http://www.fsf.or= g/facebook</font></a></div> <div><font size=3D"1"><a href=3D"http://bit.ly/hzA1MS" target=3D"_blank">ht= tp://bit.ly/hzA1MS</a><br></font></div><div><font size=3D"1"><a href=3D"htt= p://bit.ly/fztcGn" target=3D"_blank">http://bit.ly/fztcGn</a><br></font></d= iv><div> <font size=3D"1"><a href=3D"http://cli.gs/V1UtWw" target=3D"_blank">http://= cli.gs/V1UtWw</a></font></div><div><font size=3D"1"><a href=3D"http://cli.g= s/S3zVIt" target=3D"_blank">http://cli.gs/S3zVIt</a></font></div><div><a hr= ef=3D"http://goo.gl/ZBptR" style=3D"font-size:x-small" target=3D"_blank">ht= tp://goo.gl/ZBptR<br> </a></div><div><a href=3D"http://goo.gl/ZBptR" target=3D"_blank"><font size= =3D"1">http://goo.gl/tXFO7</font></a></div><div><br></div><br> </font></span></div> <br></div></div>-----------------------------------------------------------= -------------------<br> Live Security Virtual Conference<br> Exclusive live event will cover all the ways today's security and<br> threat landscape has changed and how IT managers can respond. Discussions<b= r> will include endpoint security, mobile security and the latest in malware<b= r> threats. <a href=3D"http://www.accelacomm.com/jaw/sfrnl04242012/114/5012226= 3/" target=3D"_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122= 263/</a><br>_______________________________________________<br> NAnt-users mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">NAnt-= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/nant-users" target= =3D"_blank">https://lists.sourceforge.net/lists/listinfo/nant-users</a><br> <br></blockquote></div><br> </blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><a href=3D"h= ttp://www.fsf.org/fb" target=3D"_blank"><img src=3D"http://static.fsf.org/n= osvn/no-facebook-me.png" width=3D"200" height=3D"66"></a><br><div><a href= =3D"http://www.fsf.org/facebook" target=3D"_blank"><font size=3D"1">http://= www.fsf.org/facebook</font></a></div> <div><font size=3D"1"><a href=3D"http://bit.ly/hzA1MS" target=3D"_blank">ht= tp://bit.ly/hzA1MS</a><br></font></div><div><font size=3D"1"><a href=3D"htt= p://bit.ly/fztcGn" target=3D"_blank">http://bit.ly/fztcGn</a><br></font></d= iv><div> <font size=3D"1"><a href=3D"http://cli.gs/V1UtWw" target=3D"_blank">http://= cli.gs/V1UtWw</a></font></div><div><font size=3D"1"><a href=3D"http://cli.g= s/S3zVIt" target=3D"_blank">http://cli.gs/S3zVIt</a></font></div><div><a hr= ef=3D"http://goo.gl/ZBptR" style=3D"font-size:x-small" target=3D"_blank">ht= tp://goo.gl/ZBptR<br> </a></div><div><a href=3D"http://goo.gl/ZBptR" target=3D"_blank"><font size= =3D"1">http://goo.gl/tXFO7</font></a></div><div><br></div><br> </div> --047d7b15fe0b72d6ee04c0022d5a-- --===============5707207710551839569== 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/ --===============5707207710551839569== 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 --===============5707207710551839569==--