Bugs item #3048200, was opened at 2010-08-18 16:13 Message generated for change (Comment added) made by rmboggs You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=3048200&group_id=31650
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core Group: 0.91-alpha2 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Rainer Schuster () Assigned to: Nobody/Anonymous (nobody) Summary: NAnt 0.91 Aplha 2 crashes on startup Initial Comment: I'm running nant on windows 7 x64 and getting the following exception (german). nant crashes in user mode and with elavated rights in admin mode. Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer für "NAnt.Console.ConsoleStub" hat ei ne Ausnahme verursacht. ---> System.Security.SecurityException: Fehler bei der Anforderung des Berechtigungstyps "System .Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". bei System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) bei System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) bei System.Security.CodeAccessPermission.Demand() bei System.AppDomainSetup.VerifyDir(String dir, Boolean normalize) bei System.AppDomain.get_BaseDirectory() bei log4net.Config.XmlConfiguratorAttribute.Configure(Assembly sourceAssembly, ILoggerRepository targetRepository) bei log4net.Core.DefaultRepositorySelector.ConfigureRepository(Assembly assembly, ILoggerRepository repository) bei log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly repositoryAssembly, Type repositoryType, String repositoryName, Boolean readAssemblyAttributes) bei log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly repositoryAssembly, Type repositoryType) bei log4net.Core.DefaultRepositorySelector.GetRepository(Assembly repositoryAssembly) bei log4net.Core.LoggerManager.GetLogger(Assembly repositoryAssembly, String name) bei log4net.LogManager.GetLogger(Assembly repositoryAssembly, String name) bei log4net.LogManager.GetLogger(Type type) bei NAnt.Console.ConsoleStub..cctor() --- Ende der internen Ausnahmestapelüberwachung --- bei NAnt.Console.ConsoleStub.Main(String[] args) ---------------------------------------------------------------------- Comment By: Ryan Boggs (rmboggs) Date: 2010-09-12 18:21 Message: Tonst, I understand the frustration. Thanks for your exception output, it'll help track this thing down. In the meantime, for your situation and if you have the necessary access, might I suggest building nant 0.91 Alpha2 from source? It seems others who have run into similar issues were able to get around them by building it themselves. I hope this helps. Thanks, Ryan ---------------------------------------------------------------------- Comment By: Tony Langford (tonst) Date: 2010-09-10 07:25 Message: Use CC.net to run nant. Coming from 0.90 with no problems to 0.91 Alpha2 and now get the same error be it running nant.exe with no params, with a build file that is empty, or with the build file I use on 0.90. Doesn't matter if i run from cmd with admin either. Unhandled Exception: System.TypeInitializationException: The type initializer fo r 'NAnt.Console.ConsoleStub' threw an exception. ---> System.Security.SecurityEx ception: Request for the permission of type 'System.Security.Permissions.FileIOP ermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5619 34e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMa rk& stackMark, Boolean isPermSet) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, S tackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand() at System.AppDomainSetup.VerifyDir(String dir, Boolean normalize) at System.AppDomain.get_BaseDirectory() at log4net.Config.XmlConfiguratorAttribute.Configure(Assembly sourceAssembly, ILoggerRepository targetRepository) at log4net.Core.DefaultRepositorySelector.ConfigureRepository(Assembly assemb ly, ILoggerRepository repository) at log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly repositor yAssembly, Type repositoryType, String repositoryName, Boolean readAssemblyAttri butes) at log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly repositor yAssembly, Type repositoryType) at log4net.Core.DefaultRepositorySelector.GetRepository(Assembly repositoryAs sembly) at log4net.Core.LoggerManager.GetLogger(Assembly repositoryAssembly, String n ame) at log4net.LogManager.GetLogger(Assembly repositoryAssembly, String name) at log4net.LogManager.GetLogger(Type type) at NAnt.Console.ConsoleStub..cctor() --- End of inner exception stack trace --- at NAnt.Console.ConsoleStub.Main(String[] args) Running on 2008r2, VS2008, VS2010, .net 3.51 & 4 Need this working quite urgently as out projects are now .net 4.... don't really want to rewrite the scripts into Visual Build. ---------------------------------------------------------------------- Comment By: Rainer Schuster () Date: 2010-08-22 12:26 Message: using nmake did the job, boostrapped nant and installed it right into the place. lessons i learned: 1. I haven't installed .NET 2.0 SDK 2. The NAnt.exe.config has no supported runtime specified 3. Using NAnt boostraped with target 4.0 did the job, becaus i really have to run nant under 4.0 profile. Boo boostrapps itself the Boo.NAnt.Tasks.dll. This assembly gets compiled with the 4.0 Framework (this is what I'm interessted in). 4. setting the supportedRuntime attribute to 4.0 and using nant build with 3.5 profile worked, too. So it seems like i should have .NET Framework 2.0 installed on my notebook. I don't really know what caused my problems crashing nant on startup. May it be that NAnt requires vanilla .NET 2.0 (not 3.5). Neverthe less. Building boo only succeeds running under 4.0 because the Boo.NAnt.Tasks.dll is boostrapped and build with the 4.0 profile. And this bootstrapped assembly is used within the build file ... In the end it doesn't really matter how I'm going to run nant with the 4.0 Profile. But it's neccessary. Either by specifying it as supportedRuntim or by boostrapping it with the 4.0 target. cheers, ---------------------------------------------------------------------- Comment By: Rainer Schuster () Date: 2010-08-22 04:43 Message: i did the bootstrap manually, but used the 4.0 profile. using gmake from my perl bin doesn't work. what version are you using? there is a missing blank blank. i'd try another version of gmake. which one should i use? PS > gmake install prefix="c:\shared\tools\nant-test" mkdir -p bootstrap cp -R lib/ bootstrap/lib # Mono loads log4net before privatebinpath is set-up, so we need this in the same directory # as NAnt.exe cp lib/common/neutral/log4net.dll bootstrap cp src/NAnt.Console/App.config bootstrap/NAnt.exe.config mcs -target:exe -define:MONO -out:bootstrap\\NAnt.exe -r:bootstrap\\log4net.dll \ -recurse:src\\NAnt.Console\\*.cs src\\CommonAssemblyInfo.cs /c/Program Files (x86)/Mono-2.6.7/bin/mcs: /c/Projects/oss/nant-0.91-alpha2/C:/PROGRA~2/MONO-2~1.7/bin/mono: No such fil e or directory /c/Program Files (x86)/Mono-2.6.7/bin/mcs: exec: /c/Projects/oss/nant-0.91-alpha2/C:/PROGRA~2/MONO-2~1.7/bin/mono: canno t execute: No such file or directory gmake: *** [bootstrap/NAnt.exe] Error 126 ---------------------------------------------------------------------- Comment By: Ryan Boggs (rmboggs) Date: 2010-08-21 22:08 Message: I am unable to replicate this on my test box. I find it odd that the binaries fail but compiling from source works. In your last post, you said that building the last alpha with 0.90 worked. Have you tried building 0.91 Alpha2 from scratch with either nmake or gmake? Could you give that a try and let us know how that works? The commands to build should be in the tar balls. Also, to answer your question about debugging NAnt, I usually add the -v+ and -debug+ arguments in the command line when I am building a project with NAnt. ---------------------------------------------------------------------- Comment By: Rainer Schuster () Date: 2010-08-21 16:55 Message: Finally, I was able to compile boo with a rebuild version of nant compiled with the 4.0 profile. I built nant 0.91 alpha2 with 0.90 and target 4.0. This is the only way to compile boo (at least for me). Having a nant compiled against a .NET 4.0 profile ---------------------------------------------------------------------- Comment By: Rainer Schuster () Date: 2010-08-21 05:15 Message: no, copying the files didn't fix it. Win7 includes 3.5. I've got 4.0 client and extended installed, along with the 7 SDK and the .NET 2.0 SDK. The 0.90 doesn't crash. I'll try debugging it. Are there any hints on how to best debug nant. ---------------------------------------------------------------------- Comment By: Ryan Boggs (rmboggs) Date: 2010-08-20 15:02 Message: Just out of curiosity, what versions of .NET do you have installed? ---------------------------------------------------------------------- Comment By: Ryan Boggs (rmboggs) Date: 2010-08-19 14:57 Message: Are you saying that copying the libs from bin\lib\net\1.0 to bin\lib\net\4.0 fixed the issue? ---------------------------------------------------------------------- Comment By: Rainer Schuster () Date: 2010-08-19 13:04 Message: I tried to compile the current Boo master. But it's not neccessary to crash nant. I just started the exe without a build file. I copied the libs from bin\lib\net\1.0 over to bin\lib\net\4.0 just to have them in place. anything else is quite standard. ---------------------------------------------------------------------- Comment By: Ryan Boggs (rmboggs) Date: 2010-08-18 17:05 Message: Can you please send the file that you are trying to build (or a simplified build file if it contains sensitive information)? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=3048200&group_id=31650 ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers