[NAnt-users] 0.92 Beta 1 release not compiled with NET_4_0 define
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 NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users
Re: [NAnt-users] 0.92 Beta 1 release not compiled with NET_4_0 define
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 peter.m.mce...@gmail.comwrote: 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 NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users -- 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 NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users
Re: [NAnt-users] 0.92 Beta 1 release not compiled with NET_4_0 define
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 rmbo...@gmail.com 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 peter.m.mce...@gmail.comwrote: 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 NAnt-users@lists.sourceforge.net 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 -- 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 NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users