为什么Nant不与TeamCity合作?
-
04-07-2019 - |
题
我没有设置构建我的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>
这是错误:
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
其他提示
您可能没有安装.NET Framework 2.0 SDK。
这是在0.86 beta1发布后修复的。在2010年4月1日,0.90发布了修复,以防升级nant是一个选项。为了提供更多详细信息,0.90中的修订版本似乎是对nant.exe.config文件的简单更改。下面添加了粗体文本,可能无需安装2.0 SDK即可解决问题。
<directory name="${path::combine(sdkInstallRoot, 'bin')}"
if = <!> quot; $ {property :: exists('sdkInstallRoot')} <!> quot; / <!> gt;
更新net-2.0部分以修复它。
请参阅 http://www.mail- archive.com/nant-developers@lists.sourceforge.net/msg07519.html ;它是0.86 beta1中的一个已知错误。
我遇到过与NAnt类似的问题。我知道这不是 Best 解决方案,但是如果你需要让你的项目移动它是有效的。
我发现在服务器上安装开发环境(C#Express对我不起作用,但VS 2008没有用)会使这个问题消失。 (是的,我意识到这违反了正常的最佳做法,但它可以运行并让我的脚本运行,所以我可以回到编码。)
刚想我会分享任何其他人处于类似情况......(这对我和CruiseControl.Net以及Hudson都有用。)