Cruise control ASPNETCOMPILER:错误ASPRUNTIME:预编译目标目录

use*_*839 3 cruisecontrol.net msbuild clearcase

当我尝试通过CruiseControl和MSBuild版本4构建解决方案文件时,我收到以下错误

ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory
Run Code Online (Sandbox Code Playgroud)

它来自哪里以及如何避免它?

Von*_*onC 5

您需要仔细检查预编译目录位置.

你需要:

  • 删除其内容(如" ASPNETCOMPILER:错误ASPRUNTIME:目标目录不为空 ")
  • 检查其路径(Debug.AspNetCompiler.TargetPathRelease.AspNetCompiler.TargetPath溶液中的文件)是可写的(例如,你不能在ClearCase的动态视图的根目录写入:M:\MyView)
  • 检查Cruise Control是否可以访问您的视图(特别是如果它是动态视图)

如" 尝试使用aspnet_compiler从命令行构建和发布Asp.net网站 "中所示,错误消息通常更完整,类似于:

Error: error ASPRUNTIME: The precompilation target directory
(c:\Inetpub\wwwroot\WebsiteOne) 
cannot be in the same tree as the source application directory 
(c:\inetpub\wwwroot\WebsiteOne).
Run Code Online (Sandbox Code Playgroud)

从博客文章" CruiseControl.NET入门 ":

对于Web解决方案,请将应用程序TargetPathDebug和/或Release构建更新为源应用程序目录之外的内容.
否则,您将收到以下错误:

ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory cannot be in the same tree as the source application directory.
Run Code Online (Sandbox Code Playgroud)

这可以通过修改解决方案文件中的以下内容来完成:

Debug.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”
Release.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”
Run Code Online (Sandbox Code Playgroud)

或者,可以更新应用程序MSBuild属性中找到的输出位置.

您可能想知道为什么更新的解决方案不会使用下一个计划的构建进行更新.当它成功(并且有意义)时,只有应用于源代码控制的更改会被拉到构建框中.