You are here: Home » Silverlight XAP File Out of Date When Built with Expression Blend

Silverlight XAP File Out of Date When Built with Expression Blend

Posted by davidwise
No Comments »

 

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:

  1. Close Blend
  2. Open Visual Studio
  3. 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.

Your email is never shared.
Required fields are marked *




Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>