为什么Nant不与TeamCity合作?

Mik*_*osa 7 nant asp.net-mvc teamcity

我没有设置构建我的ASP.NET MVC项目,它在本地工作正常.我将nant添加到tools文件夹并将其添加到版本控制.TeamCity获取我的更改并启动构建但它失败了.

我相信我使用的是最新版本的Nant,我已将.net framework 3.5添加到nant.exe.config中.我在服务器上缺少什么,是的.net框架是安装在服务器上的,因为如果我在那里手动构建和部署asp.net mvc应用程序吗?

构建文件如下:

<target name="compile" description="Compiles using the AutomatedDebug Configuration">
    <msbuild project="Tolt.Sims.sln" />
</target>
Run Code Online (Sandbox Code Playgroud)

这是错误:

BUILD FAILED Failed to initialize the 'Microsoft .NET Framework 2.0' (net-2.0) target framework.
Property evaluation failed. Expression: ${path::combine(sdkInstallRoot, 'bin')} ^^^^^^^^^^^^^^ Property 'sdkInstallRoot' has not been set.
For more information regarding the cause of the build failure, run the build again in debug mode. Try 'nant -help' for more information

Sco*_*aad 4

如果您使用的是 NAnt 的 beta 版本(目前这是您获得针对高于 2.0 框架的目标的支持的唯一方法),您可能会遇到注册表问题。Tim Barcz 报告了类似的问题。

事情几乎可以归结为 NAntContrib(msbuild 任务的提供者)指向 2.0 版本的 msbuild。查看他的解决方案,看看它是否适用于您的场景。