小编use*_*541的帖子

找不到NANT 0.92 SDK 7

环境:

Windows 2008 R2 64Bit SDK安装在C:\ Program Files(x86)\ Microsoft SDKs\Windows\v7.1中

框架安装在C:\ Windows\Microsoft.NET\Framework64\v4.0.30319

试图运行Nant来编译一些.NET 4类,我们收到以下消息.

The SDK for the 'net-4.0' framework is not available or not configured.:

            NAnt.Core.BuildException: The SDK for the 'net-4.0'
framework is not available or not configured.
               at NAnt.Core.Tasks.ExternalProgramBase.DetermineFilePath()
               at NAnt.Core.Tasks.ExternalProgramBase.get_ProgramFileName()
               at
NAnt.Core.Tasks.ExternalProgramBase.PrepareProcess(Process process)
               at NAnt.Core.Tasks.ExternalProgramBase.StartProcess()
               at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask()
               at NAnt.Core.Task.Execute()
               at NAnt.Core.Target.Execute()
               at NAnt.Core.Project.Execute(String targetName, Boolean
forceDependencies)
               at NAnt.Core.Project.Execute()
               at NAnt.Core.Project.Run()
Run Code Online (Sandbox Code Playgroud)

在查看NANt.exe.config时,它似乎会向注册表寻找SDK的适用路径.

<project>
 <readregistry
     property="installRoot"
      key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
      hive="LocalMachine" />
 <locatesdk property="sdkInstallRoot"
 minwinsdkver="v7.0A" minnetfxver="4.0" maxnetfxver="4.0.99999"
 failonerror="false" />
</project> …
Run Code Online (Sandbox Code Playgroud)

nant

5
推荐指数
1
解决办法
1982
查看次数

标签 统计

nant ×1