#769 Cannot Compile NAnt CVS Head on Win XP

cvs
closed
Core (183)
8
2011-10-04
2011-10-01
No

Whenever I try to build NAnt (the CVS head revision) on Windows XP, VS 2010 Ultimate, .NET Framework 4.0, I get an error when the bootstrapped NAnt is trying to build the documentation:

[exec] BUILD FAILED
[exec]
[exec] C:\NAnt\NAnt.build(361,14):
[exec] Error building documentation.
[exec] This method implicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
[exec]
[exec] Total time: 1.2 seconds.
[exec]
BUILD FAILED
C:\NAnt\NAnt.build(335,10):
External Program Failed: C:\NAnt/build/nant-0.91-dev/bin/NAnt.exe (return code was 1)
Total time: 10.9 seconds.
NMAKE : fatal error U1077: 'bootstrap\NAnt.exe' : return code '0x1'
Stop.
C:\NAnt>

Discussion

  • Tyler Kavanaugh

    Tyler Kavanaugh - 2011-10-01
    • priority: 5 --> 8
     
  • Ryan Boggs

    Ryan Boggs - 2011-10-01

    If you are using make to build, try using the TARGET=net-4.0 argument.

     
  • Tyler Kavanaugh

    Tyler Kavanaugh - 2011-10-01

    I am using Microsoft NMake. I first ran vsvars32.bat (from %VS100COMNTOOLS%).

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-01

    Ok try this then,
    nmake -f Makefile.nmake TARGET=net-4.0 prefix="c:\program files"

     
  • Tyler Kavanaugh

    Tyler Kavanaugh - 2011-10-01

    The file I just posted is a log file I generated with the output from the nmake command.

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-01

    Ah, I was able to replicate. I believe that the issue may be with the NDoc libs that are used to generate NAnt's docs. I am working on this now.

     
  • Tyler Kavanaugh

    Tyler Kavanaugh - 2011-10-01

    And the strange thing is that one can build *without* the install target and it builds successfully (but might not be the complete NAnt distro needed to build other apps).

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-01

    I think I am right. NAnt isn't triggering the exception, NDoc is. This is only failing in the doc generation of the build. That error regarding the "NetFx40_LegacySecurityPolicy" switch in the config file was the indicator because I spent a good amount of time weeding out these issues with NAnt specifically. The doc generation only occurs for me during nightlys and release and since we are still building with net-1.0 target for these releases, I don't see this error.

    I was able to get around this issue with the patch to the NAnt.build file in the link below. This is a temporary measure until we can find a more suitable patch to commit.
    http://pastebin.com/gC9UcYay

    Thanks,
    Ryan

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-01

    If you have issues with the diff, I posted the entire modified NAnt.build file here:
    http://pastebin.com/L0mJYQPX

     
  • Tyler Kavanaugh

    Tyler Kavanaugh - 2011-10-01

    OK, so I was able to make the "install" target work, but when it installed into the %programfiles%\NAnt folder, there was no way to launch NAnt (e.g., no NAnt.exe file under the bin subdirectory). Does this have to do with the normal build.type set in the NAnt.build file or something?

     
  • Tyler Kavanaugh

    Tyler Kavanaugh - 2011-10-02

    Correction: NAnt.exe was there after all.

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-02

    Understandable, there are quite a few files in there.

    It sounds like the cause of this bug has been identified. However I would like to keep this open until a better solution can be committed.

     
  • Tyler Kavanaugh

    Tyler Kavanaugh - 2011-10-02

    Sounds like a plan, although I'll admit that was a rather nifty solution (using XPath to reenable the setting). It's a hack, yes. So I'm all for a better solution, such as migrating to .NET Framework-provided solutions, but that could possibly break compatibility with older Framework versions.

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-02
    • assigned_to: nobody --> rmboggs
     
  • Ryan Boggs

    Ryan Boggs - 2011-10-04
    • status: open --> closed
     
  • Ryan Boggs

    Ryan Boggs - 2011-10-04

    Just committed a more long term solution for the time being. It'll probably be in place until NDoc can be replaced...

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks