kamagra how much to take

Considerations When Using TFS for SharePoint And Silverlight Development

During testing of my recent TFS migration we found a small issue with a SharePoint Application Page build that had some embedded Silverlight in it where the ClientBin directory was not being created by TeamBuild.

The error looks similar to the following:

MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets(60,3): error MSB3021: Unable to copy file “ClientBin\Base.Silverlight..xap” to “\“. Could not find a part of the path ‘ClientBin\.xap’.

So why does this happen? There could be a couple reasons you might be running into this particular error, the largest of which is the default settings of TFS not checking in the XAP files. Which doesn’t make a ton of sense. Also, you will generally run into this error when a Siliverlight project is renamed and its parent directory is renamed. Which of these causing the error will determine the appropriate resolution path.

If you are running into this because you think you are hitting the renaming error, then the easiest way to fix it is to unload the project, edit .csproj, and correct the values in the tag. After you perform a check-in and start a build the error will go away. If you are not entirely sure why it is happening and the aforementioned renaming doesn’t sound like your issue, then you can implement a couple of other things to get around the problem.

Firstly, change the referring Content item in the xap file:

  1. <Content Include="ClientBin\<SOME XAP NAME>.xap" Condition="$(IsDesktopBuild) == true" />
  2. <None Include="ClientBin\<SOME XAP NAME>.xap" Condition="$(IsDesktopBuild) != true" />

Following, in the AfterDropBuild Target, execute a manual copy of the xap to the _PublishedWebsites folder:

  1. <Exec Command="xcopy /y &quot;$(MSBuildProjectDirectory)\<BLAH BLAH BLAH>\Debug\Base.Silverlight. <SOME XAP NAME>.xap&quot; &quot;$(MSBuildProjectDirectory)\<BLAH BLAH BLAH>\Debug\_PublishedWebsites\Base\ClientBin&quot;" />

After, you should be good to go!


One Comment

  1. bszom says:

    “Firstly, change the referring Content item in the xap file:” – this is confusing. These changes need to be made in your web project file. 1. Right click > Unload Project. 2. Right click > Edit .csproj 3. Right click > Reload Project.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>