Web部署包在构建服务器上失败

时间:2010-09-16 15:30:50

标签: silverlight tfs tfsbuild

我在命令提示符下使用以下MSBuild命令:

MSBuild.exe /nologo "Server.Website.csproj" /T:Package 

在Web应用程序(ASP.NET 4 MVC)上,它依赖于对Silverlight项目的项目引用。构建时,我收到以下错误:

"C:\Builds\2\Development\Main Branch Nightly\Sources\Components\Server.Website\Server.Website.csproj" (Package target) (1) ->
(CopyAllFilesToSingleFolderForPackage target) ->
C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(1852,5): error : Copying file Content\ClientBin\Shell.xap to obj\Debug\Package\PackageTmp\Content\ClientBin\Shell.xap failed. Could not find a part of the path 'Content\ClientBin\Shell.xap'.
[C:\Builds\2\Development\Main Branch Nightly\Sources\Components\Server.Website\Server.Website.csproj]

当我从MSBuild调用中省略/T:Package时,它似乎工作正常。我错过了关于在Silverlight上为构建服务器处理XAP的事情吗?

3 个答案:

答案 0 :(得分:1)

Server.Website.csproj项目的

<Project>
   <PropertyGroup>
      <SilverlightApplicationList>

XAP项目的路径不正确。修复此问题可以解决问题。

答案 1 :(得分:0)

另一件值得尝试的事情是在ClientBin \ silverlight.xap文件中更改“构建操作”和“复制到输出目录”

答案 2 :(得分:0)

打开任务管理器并终止MSBuild.exe进程,然后重建项目

为我工作

相关问题