NAnt cannot run properly due to Security error on Windows 7 stock image

XMLWordPrintable

    • 2
    • Severity 2 - Major

      When running a NAnt build task on the Stock Bamboo Windows image, the following error occurs:

      log4net:ERROR XmlConfiguratorAttribute: Exception getting ConfigurationFileLocation. Must be able to resolve ConfigurationFileLocation when ConfigFile and ConfigFileExtension properties are not set.
      System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
      at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
      at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
      at System.Security.CodeAccessPermission.Demand()
      at System.AppDomainSetup.VerifyDir(String dir, Boolean normalize)
      at log4net.Util.SystemInfo.get_ConfigurationFileLocation()
      at log4net.Config.XmlConfiguratorAttribute.ConfigureFromFile(Assembly sourceAssembly, ILoggerRepository targetRepository)
      The action that failed was:
      Demand
      The type of the first permission that failed was:
      System.Security.Permissions.FileIOPermission
      The Zone of the assembly that failed was:
      Internet
      

      This is caused by Nant not being unblocked prior to being unpacked. See this stack Overflow past.

      The Stock Windows image needs this applied so that users can run Nant builds without making their own AMI.

            Assignee:
            Unassigned
            Reporter:
            Ivan Maduro (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: