[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
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
RE: [Nant-users] copy file problem
Title: Message Well, I think I was the other person that had the problem, and I never managed to get to the bottom of it. However, it's not a NAnt problem, as from time to time, I have had the same type of problem cleaning out a web dir using windows explorer: one moment I go to delete the contents and get a permission denied error onone of the sub directories (usually "bin"), then when I go to do it again an instant later, it will delete... -Original Message-From: Bob Archer [mailto:[EMAIL PROTECTED] Sent: 04 May 2004 15:47To: Brian Etheridge; [EMAIL PROTECTED]Subject: RE: [Nant-users] copy file problem I found that the problem was what someone else was mentioning here. The server had files locked and I couldn't copy over them. What happened to XCopy deployment? The server isn't supposed to lock files right? From: Brian Etheridge [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 10:39 AMTo: Bob Archer; [EMAIL PROTECTED]Subject: RE: [Nant-users] copy file problem I think the includes should either be "*.*", or if you want to use the "**" shorthand value then you also need to specify a partial path. I happen to have been looking at this this mrning and that's what I gathered from the task list documentation (I haven't tried this myself). Here's the reference http://nant.sourceforge.net/help/types/fileset.html. -Original Message-From: Bob Archer [mailto:[EMAIL PROTECTED]Sent: Tuesday, May 04, 2004 3:31 PMTo: [EMAIL PROTECTED]Subject: [Nant-users] copy file problem I'm using the 5/3 nightly build with the following script: target name="CopyToQA" description="Copy to QA directory." echo message="Copy runtime files to QA." / copy todir="\\qaevolution2003\wwwroot\Geac.QA" fileset basedir="\\devevolution2k3\C$\DailyBuild\" includes name="**" / /fileset /copy /target Getting the following error: System.ArgumentException: Invalid File or Directory attributes value. at System.IO.File.SetAttributes(String path, FileAttributes fileAttributes) at NAnt.Core.Tasks.CopyTask.ExecuteTask() in C:\DOCUME~1\ADMINI~1\LOCALS~1\Te mp\tmp9E.tmp\src\NAnt.Core\Tasks\CopyTask.cs:line 314 at NAnt.Core.Task.Execute() in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp9E.tmp\s rc\NAnt.Core\Task.cs:line 151 at NAnt.Core.Target.Execute() in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp9E.tmp \src\NAnt.Core\Target.cs:line 249 at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp9E.tmp\src\NAnt.Core\Project.cs:line 892 at NAnt.Core.Project.Execute() in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp9E.tm p\src\NAnt.Core\Project.cs:line 849 at NAnt.Core.Project.Run() in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp9E.tmp\sr c\NAnt.Core\Project.cs:line 917 Please send bug report to [EMAIL PROTECTED]. What am I doing wrong? For some reason, I thought this had worked when I wrote it. Bob
[Nant-users] Access denied using copy task for ASP.Net project
Folks, I am using NAnt to build a number of web projects and then to deploy them to an IIS instance. Occasionally, the deploy fails with a Cannot Copy 'file'. Access to the path 'file' is denied. where file is some assembly that needs to be replaced. If I run the deploy again, it will usually work (occasionallt not, but persistance pays off and it will eventually deploy). Now I presume this is something to do with the IIS thread accessing the assembly at the same time that I want to overwrite it. I do not want to set failonerror=false as I do actually want to replace the files. The same error can happen if I try to delete the remote files before deploying. Is this a feature of the so-called MS .Net XCopy deploy functionality? Is there anything that I can do to ensure that the delete and copy will actually work, as this error is not really making life easy for a hands-off build and deploy Cheers Pete --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
RE: [Nant-users] Access denied using copy task for ASP.Net projec t
I was using the copy task - or the delete task in the cases where I was deleting before the copy. I will try the exec task and shell out to xcopy - but if this is a success, it's hiding a problem in the copy and delete tasks... Pete -Original Message- From: Bob Archer [mailto:[EMAIL PROTECTED] Sent: 07 April 2004 16:25 To: Peter McEvoy; [EMAIL PROTECTED] Subject: RE: [Nant-users] Access denied using copy task for ASP.Net project Well, ASP.Net is actually supposed to make copies of the DLL's in the bin folder and use the copies. It does this to facilitate XCOPY deployment and live updates. I'm not sure why you are having the problem. Are you ALWAYS able to copy them using the command line? Have you tried to use the shell to copy the files using the EXEC task? Bob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter McEvoy Sent: Wednesday, April 07, 2004 11:17 AM To: [EMAIL PROTECTED] Subject: [Nant-users] Access denied using copy task for ASP.Net project Folks, I am using NAnt to build a number of web projects and then to deploy them to an IIS instance. Occasionally, the deploy fails with a Cannot Copy 'file'. Access to the path 'file' is denied. where file is some assembly that needs to be replaced. If I run the deploy again, it will usually work (occasionallt not, but persistance pays off and it will eventually deploy). Now I presume this is something to do with the IIS thread accessing the assembly at the same time that I want to overwrite it. I do not want to set failonerror=false as I do actually want to replace the files. The same error can happen if I try to delete the remote files before deploying. Is this a feature of the so-called MS .Net XCopy deploy functionality? Is there anything that I can do to ensure that the delete and copy will actually work, as this error is not really making life easy for a hands-off build and deploy Cheers Pete --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/n ant-users --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
RE: [Nant-users] Properties problem on nant task
Do you need to set readonly=true on the properties you are passing in? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 05 April 2004 07:58 To: [EMAIL PROTECTED] Subject: [Nant-users] Properties problem on nant task Hi, I have a bit of a problem with the nant task and can't see what's wrong. Below is a copy of my build script and the associated output. According to the documentation, I should be able to use a property value in my current project to pass through top a new NAnt instance, but it seems to be failing. Am I missing something really stupid or is it a bug? I'm using NAnt 0.84 As you can see below, the property ${propfile} appears to be defined until I use it in the nested properties element on the nant task. Cheers, Bill Build Script project name=DailyBuild default=compile basedir=. target name=init tstamp property=build.date pattern=dd MMM HH:mm / echo message=${build.date}/ echo message=Performing Daily Build .../ property name=webserver.install.dir value=install/webserver / property name=appserver.install.dir value=install/appserver / echo message=nant.home=${nant.home} / echo message=src.home=${src.home} / echo message=vssarchive.home=${vssarchive.home} / echo message=vssproject.home=${vssproject.home} / echo message=vssversion=${vssversion} / echo message=systembuild.file=${systembuild.file} / echo message=propfile=${propfile} / echo message=vss.user=${vss.user} / echo message=vss.password=${vss.password} / /target target name=prepare depends=init/ !--Delete exiting source-- target name=clean depends=prepare !--delete dir=${src.home} failonerror=false /-- /target !--Extract Latest Version of Source-- target name=getsource depends=clean !--vssget localpath=${src.home} recursive=true dbpath=${vssarchive.home} path=${vssproject.home} user=${vss.user} password=${vss.password} /-- /target !--Build the system-- target name=compile depends=getsource echo message=propfile=${propfile} / nant buildfile=${src.home}/ExWebGold.build target=all inheritall=false properties property name=prop.file value=${propfile} / /properties /nant /target !--Deploy the system to the test server-- target name=deploy depends=compile !-- Create the install sets -- nant buildfile=${src.home}/install.build target=allservers inheritall=false properties property name=webserver.install.dir value=$src.home}/${webserver.install.dir} / property name=appserver.install.dir value=$src.home}/${appserver.install.dir} / /properties /nant /target /project Output to log = Buildfile: file:///C:/DailyBuild/DailyBuild.build Target(s) specified: compile init: [tstamp] 05 April 2004 08:43:34. [echo] 05 Apr 2004 08:43 [echo] Performing Daily Build ... [echo] propfile=C:\MySystem\properties.build [echo] nant.home=C:\NAnt_0.84 [echo] src.home=C:\MySystem [echo] vssarchive.home=\\SERVER\Share\MySystem\srcsafe.ini [echo] vssproject.home=$/Source/Build/MySystem [echo] vssversion= [echo] systembuild.file=MySystem.build [echo] propfile=C:\MySystem\properties.build [echo] vss.user=guest [echo] vss.password= prepare: clean: getsource: compile: [echo] propfile=C:\MySystem\properties.build [nant] C:\MySystem/MySystem.build all BUILD FAILED C:\DailyBuild\DailyBuild.build(56,18): Property 'propfile' has not been set. Total time: 0.2 seconds. __ CONFIDENTIALITY NOTICE This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you are not the intended recipient, please contact us immediately. The contents of any attachments in this e-mail may contain software viruses, which could damage your own computer system. While Marlborough Stirling has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage, which you sustain as a result of software viruses. You should carry out your own virus checking procedure before opening any attachment. Marlborough Stirling plc, Registered in England and Wales Registered No. 3008820, Allen Jones House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH Tel:
RE: [Nant-users] another Licx problem
Title: Message I think you then have to useal to include the generated .license file into your EXE. eg al output="bin\GBE.dll" target="lib"sourcesincludes name="bin\GBE.dll.license" /includes name="bin\*.resources" //sources/al I could be wrong - I've had horrible experiences with license files to the point that I doubt if its working... Pete -Original Message-From: steve gupta [mailto:[EMAIL PROTECTED] Sent: 31 March 2004 15:52To: [EMAIL PROTECTED]Subject: [Nant-users] another Licx problem I have spent a little while reading through the messages trying to get a handle on this problem I am having. I am trying to compile a c# app that uses the c1 components. I followed someone elses example of how they wrote the license tags. heres a snipet of my build file. target name="build" depends="init" description="compile the code" license input="${sps.src}\licenses.licx" output="${sps.out}\SalesPlanningSystem.exe.licenses" licensetarget="SalesPlanningSystem.exe" assemblies includes name="${sps.out}\C1.Win.C1List.dll"/ includes name="${sps.out}\C1.Common.dll"/ includes name="${sps.out}\C1.Win.C1Sizer.dll"/ includes name="${sps.out}\C1.Win.C1Input.dll"/ includes name="${sps.out}\C1.Win.C1FlexGrid.dll"/ /assemblies /license csc target="winexe" output="${sps.out}\SalesPlanningSystem.exe" debug="${sps.debug}" win32icon = "${sps.src}/App.ico" references includes asis="true" name="System.dll"/ includes asis="true" name="System.Data.dll"/.. The app compiles and runs, but I keep getting those annoying c1 popup boxes when starting the app. I don't get those when compiling from the gui. What am I doing wrong? Thanks, Steve G
RE: [Nant-users] Problem with resgen task in nightly build
I've seen another problem with resgen: empty ResX files (which VS will generate from time to time) with the latest nightly, generate an Xml exception: error: Invalid ResX input. error: Specific exception: XmlException Message: Invalid ResX input. --- XmlException: The root element is missing. 2 error(s). This does not happen with the nightly from 02/26. Pete -Original Message- From: Gert Driesen [mailto:[EMAIL PROTECTED] Sent: 19 March 2004 22:47 To: Tom Lathrop Cc: [EMAIL PROTECTED] Subject: Re: [Nant-users] Problem with resgen task in nightly build Tom, This looks like a regression to me. Can you package up a zip file containing the minimum set of files necessary to reproduce this issue ? Thanks, Gert On Fri, 2004-03-19 at 22:52, Tom Lathrop wrote: I'm having trouble with the resgen task in the latest nightly build. My build file looks like: property name=resource.dir value=./resources / target name=build description=Builds the current configuration mkdir dir=${resource.dir} / resgen verbose=true todir=${resource.dir} resources prefix=${nant.project.name} includes name=**/*.resx / /resources /resgen [...] My project directory contains 2 .resx files. With the 0.84 build, the resgen task creates 2 files with .resources extensions in a resources subdirectory, each with the base name of one of the .resx files, and each of whose names are prefixed with the project name. So if my project name were MyProject and my .resx files were Foo1.resx and Foo2.resx, my resources directory would have MyProject.Foo1.resources and MyProject.Foo2.resources. That's what I expect, and what I want. In the 0.85 nightly build, nothing gets written to the resources subdirectory. Instead, the output filenames following the resgen.exe /compile switch are both .resources. So of course what happens is that the resources for the first .resx file are written to a file called .resources in my source directory, and the resources for the second .resx file are written to the same filename, overwriting the first one. Unfortunately, I can't use the 0.84 build, since one of my projects needs to load an XML schema file as an embedded resource. The XML schema file has been retrieved from source control, and so is read-only. There's a known bug in 0.84 that causes it to crash when embedding a read-only resource file like that. That bug is fixed in the nightly build. Has the required syntax for the resgen task changed since 0.84? Tom --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/n ant-users --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
RE: [Nant-users] Double expansion of property names?
That sounds ideal! Cheers! -Original Message- From: Scott Hernandez [mailto:[EMAIL PROTECTED] Sent: 05 March 2004 18:55 To: [EMAIL PROTECTED] Subject: Re: [Nant-users] Double expansion of property names? Pete, Using the new expression support that is the nightly builds, and will be in .85, you can do this... project property name=var value=val/ property name=val.var value=hi/ echo message=${property::get-value(var + '.var')}/ /project C:\src\sf.net\nantbin\nant -f:expand.xml NAnt 0.85 (Build 0.85.1518.0; net-1.0.win32; nightly; 2/27/2004) Copyright (C) 2001-2004 Gerry Shaw http://nant.sourceforge.net Buildfile: file:///expand.xml [echo] hi BUILD SUCCEEDED Total time: 0.1 seconds. But other than that, I don't believe we decided to allow nested expression like this. I remember the discussion, and I think the decision was made to use functions rather than nested expressions. :) Does this work for you? - Original Message - From: Peter McEvoy [EMAIL PROTECTED] Subject: [Nant-users] Double expansion of property names? Hi all, I am trying to build a library of reusable targets that I can include into my build files. In order to do this, I'd really like to be able to be able to evaluate properties like the following: ${$nant.project.name}.dist.dir} in my reusable target, which would then expand to the value of (say) ${myproj.dist.dir} I get an error if I try this (which I kinda expected). Is there any way I could workaround this? Pete --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/n ant-users --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
[Nant-users] Double expansion of property names?
Hi all, I am trying to build a library of reusable targets that I can include into my build files. In order to do this, I'd really like to be able to be able to evaluate properties like the following: ${$nant.project.name}.dist.dir} in my reusable target, which would then expand to the value of (say) ${myproj.dist.dir} I get an error if I try this (which I kinda expected). Is there any way I could workaround this? Pete --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users