Bugs item #3048200, was opened at 2010-08-18 23:13
Message generated for change (Comment added) made by 
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: Rainer Schuster ()
Date: 2010-08-22 19: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 11: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-22 05: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 23: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 12: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 22:02

Message:
Just out of curiosity, what versions of .NET do you have installed?

----------------------------------------------------------------------

Comment By: Ryan Boggs (rmboggs)
Date: 2010-08-19 21: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 20: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-19 00: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

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to