Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I installed .NET 4 and WinSDK 7.1 and could not build.
So I uninstalled .NET 4 and WInSDK 7.1
Currently I have .NET 3.5 SP1 and Win SDK 7 (7.0) installed.
The attached file suggests that the build dies in log4net.
results of trying to build nightly nant
I know that you are detailed with your troubleshooting based on past experience but I must ask. Are you positive that you completely removed .NET 4.0 and WinSDK 7.1? The ONLY reason I ask is because at the bottom of your output file you provided, the familiar error message that has been plaguing us is still showing up. Plus, it looks like it is referencing the .NET 4.0 mscorlib file as well.:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'NAnt.Console.ConsoleStub' threw an exception. ---> System.Security.SecurityException: Request for
the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.AppDomainSetup.VerifyDir(String dir, Boolean normalize)
at log4net.Config.XmlConfiguratorAttribute.Configure(Assembly sourceAssembly, ILoggerRepository targetRepository)
at log4net.Core.DefaultRepositorySelector.ConfigureRepository(Assembly assembly, ILoggerRepository repository)
at log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly repositoryAssembly, Type repositoryType, String repositoryName, Boolean readAssemblyAttributes)
at log4net.Core.DefaultRepositorySelector.GetRepository(Assembly repositoryAssembly)
at log4net.Core.LoggerManager.GetLogger(Assembly repositoryAssembly, String name)
at log4net.LogManager.GetLogger(Type type)
--- End of inner exception stack trace ---
at NAnt.Console.ConsoleStub.Main(String args)
NMAKE : fatal error U1077: 'bootstrap\NAnt.exe' : return code '0xe0434352'
If you removed .net 4.0, try removing the "NetFx40_LegacySecurityPolicy" tag from App.config (NAnt.exe.config) file. If that doesn't help, let's see if we can turn debugging on in the bootstrap. I can post a test NMake file with debugging enabled if needed for you to test.
NMake makefile to help with debugging
Just posted a modified NMake file to use to help debug this issue.
You're right. I made a mistake. I removed the .NET 4 "extensions" but missed the .NET 4 core. And that's enough to be a problem.
So my original report is bogus and I am resolving it as "Rejected."
Here is my attempt to correct my mistake:
So now I have really (really!) removed .NET 4. I even fell back to a restore point before I installed .NET 4 so I'm very confident now.
So with .NET 3.5 SP1 (and nothing later) installed, I am able to build NAnt nightly. [[Incidentally, on Win7, trying to install to prefix="C:\Programs" will fail because of UAC -- even when logged into an Administrative account. No problem, just "install" to a user directory and then copy that directory to C:\Programs.]]
Next: Install .NET 4 and try to build NAnt : fails with the System.Security.SecurityException on FileIOPermission -- even if specifying TARGET=net3.5 on the nmake command line.
Note that all of this was done with WinSDK 7 (7.0 for .NET 3.5 SP1) not WinSDK 7.1 (for .NET 4)
It's getting late here. I will try the enhanced makefile tomorrow.
Guess: It may be significant that the log4net homepage clearly states support up to .NET 2. So it's not surprising that it also supports .NET 3.5 at runtime. But its also quite plausible that it does not support .NET 4 yet because of the CAS changes. I'm assuming that NAnt uses log4net as its primary logging tool. Turning it off -- even as a test -- might not be a good idea. I tried earlier today to build log4net from source specifically for .NET 3.5 and didn't quite get it right. If I can get a clean build for .NET 3.5 then maybe I can also figure out how to get a build for .NET 4 and see if that allows NAnt to both build for and run under .NET 4. Again, I'd look to making selective use of [SecuritySafeCritical]. If I have some slow time this week, maybe I'll get a chance. But I'm hoping someone gets there before me. :)
I tried the Makefile.debug.nmake. I have attached my results. Unfortunately, I don't think it tells us much that we did not already see.
build w/extra debugging for .NET 3.5 target while .NET 4 installed