【问题标题】:Cruise control ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory巡航控制 ASPNETCOMPILER : 错误 ASPRUNTIME: 预编译目标目录
【发布时间】:2013-01-15 07:15:16
【问题描述】:

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

ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory

它从何而来,如何避免?

【问题讨论】:

  • 我编辑的答案准确吗?我在下面描述的错误消息是您的错误消息吗?

标签: msbuild cruisecontrol.net clearcase


【解决方案1】:

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

您需要:

  • 删除其内容(如“ASPNETCOMPILER : error ASPRUNTIME: Target Directory not empty”)
  • 检查其路径(解决方案文件中的Debug.AspNetCompiler.TargetPathRelease.AspNetCompiler.TargetPath)是否可写(例如,不能在ClearCase 中的动态视图的根目录中写入:M:\MyView
  • 检查 Cruise Control 是否可以访问您的视图(尤其是动态视图)

如“Trying to Build and Publish Asp.net website from command line using aspnet_compiler”所示,错误信息通常比较完整,类似于:

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).

来自博文“Getting Started with CruiseControl.NET”:

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

ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory cannot be in the same tree as the source application directory.

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

Debug.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”
Release.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”

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

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

【讨论】:

【解决方案2】:

我已通过以下更改解决了该问题:

Debug.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”
Release.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”

【讨论】:

  • 很好的反馈,除了我上面的回答。 +1
【解决方案3】:

在解决方案资源管理器中右键单击项目 选择属性页 选择对话框左侧的 MSBuild 选项 更改 OutputFolder 的路径 - 确保您的路径不在同一路径树下

【讨论】:

    猜你喜欢
    • 2011-04-18
    • 1970-01-01
    • 2014-12-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多