Web Deploy Packages fail on build server
I am using the following MSBuild command form the command prompt:
MSBuild.exe /nologo "Server.Website.csproj" /T:Package
on a web application (ASP.NET开发者_如何转开发 4 MVC) that relies on a project reference to a Silverlight project. When building, I get the following error:
"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]
When I omit the /T:Package
from the MSBuild call, it seems to work fine. Am I missing something about handing XAPs for build servers on silverlight?
In the Server.Website.csproj
project, under
<Project>
<PropertyGroup>
<SilverlightApplicationList>
the path to the XAP's project was incorrect. Fixing this issue corrected the problem.
Another thing worth trying is to change "Build Action" and "Copy to Output Directory" on your ClientBin\silverlight.xap file
open task manager and kill MSBuild.exe processess, then rebuild the projects
worked for me
精彩评论