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

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. The strange thing is that this was working, but something has broken it and we can’t figure out what.

Anybody seen this before?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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. To fix the problem, I copied the two files from the C:Program FilesMSBuildMicrosoftVisualStudiov9.0WebApplications folder to the same location on the build server. Now everything works as it should.

Now if only I could find out which installer should have updated those files…

Method 2

I found the following tag in my project file fixed it:

<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)MicrosoftVisualStudiov$(VisualStudioVersion)</VSToolsPath>

e.g.

<PropertyGroup>
  <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)MicrosoftVisualStudiov$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)WebApplicationsMicrosoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)MicrosoftVisualStudiov10.0WebApplicationsMicrosoft.WebApplication.targets" Condition="false" />

Maybe VSToolsPath is set before this point on my local machine, but not on the build server.

Method 3

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.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x