The latest project I am working on involves some rather tight integration between Silverlight and SharePoint so I'm getting my feet wet with these tools in the SharePoint-o-Sphere.
I recently ran into an issue where the .XAP file that is needed for Silverlight would not update properly whenever I built the solution within Expression Blend. If I switched over to Visual Studio, then it would work perfectly. A quick search showed no conclusive fix for this issue so I came up with this bute force workaround:
- Close Blend
- Open Visual Studio
- go to Project -> Properties -> Build Events and enter the line below in the Post-build event (replacing the web name as needed)
xcopy /y "$(TargetDir)$(TargetName).xap" "$(SolutionDir)sample.webClientBin"
After that, the build works fine in both Visual Studio and in Blend.
I should point out that when I initially created this solution the build worked fine in both Blend and Visual Studio. The Blend build stopped updating the XAP file when I restructured the solution in order to put the projects into Team Foundation Server. I cannot find anything in the folder structure itself that points to the old folders or structure so I am not sure where this behavior is coming from.