简体   繁体   English

Silverlight xap文件未复制到Build Server上的ClientBin

[英]Silverlight xap file not being copied to ClientBin on Build Server

We're developing a ASP.Net Web Application project that has a Silverlight 2.0 component. 我们正在开发一个具有Silverlight 2.0组件的ASP.Net Web应用程序项目。 We've referenced the silverlight project in the web application properties, and the xap file is being copied to the ClientBin folder of the Web application when we build locally. 我们在Web应用程序属性中引用了silverlight项目,当我们在本地构建时,xap文件被复制到Web应用程序的ClientBin文件夹中。

The problem is that when we build this on our build server (which is using CruiseControl.Net, though I don't think that's relevant) the xap file isn't being copied. 问题是,当我们在构建服务器上构建它时(使用CruiseControl.Net,虽然我不认为这是相关的)xap文件没有被复制。 The strange thing is that this was working, but something has broken it and we can't figure out what. 奇怪的是,这是有效的,但有些事情已经打破了,我们无法弄清楚是什么。

Anybody seen this before? 以前有人见过这个吗?

Sorted! 排序!

Not quite sure why, but it turns out we had an out-of-date version of Microsoft.WebApplications.targets on the build server - the version we had didn't have the CopySilverlightApplications task in it. 不太清楚为什么,但事实证明我们在构建服务器上有一个过时的Microsoft.WebApplications.targets版本 - 我们的版本中没有CopySilverlightApplications任务。 To fix the problem, I copied the two files from the C:\\Program Files\\MSBuild\\Microsoft\\VisualStudio\\v9.0\\WebApplications folder to the same location on the build server. 为了解决这个问题,我将这两个文件从C:\\Program Files\\MSBuild\\Microsoft\\VisualStudio\\v9.0\\WebApplications文件夹复制到构建服务器上的相同位置。 Now everything works as it should. 现在一切正常。

Now if only I could find out which installer should have updated those files... 现在,如果我能找出哪个安装程序应该更新这些文件......

I found the following tag in my project file fixed it: 我发现我的项目文件中的以下标记修复了它:

<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

eg 例如

<PropertyGroup>
  <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

Maybe VSToolsPath is set before this point on my local machine, but not on the build server. 也许VSToolsPath在我的本地机器上设置之前,但不在构建服务器上。

I just had a similar issue where some files weren't being built/moved to my dev server. 我只是遇到了类似的问题,其中一些文件没有被构建/移动到我的开发服务器。 The issue ended up being permission as I manually deleted a folder. 当我手动删除文件夹时,该问题最终获得了许可。 For some reason, the Network Service account and permissions weren't being inherited by the newly recreated folder. 出于某种原因,新重新创建的文件夹不会继承网络服务帐户和权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM