Silverlight Applications do not Build in Team Build
- I'm not sure if this is the right forum but I'm going to start here.
I have a solution that has a Silverlight Application project and hosting Web Project. When I put this solution under Source Control I get all kinds of problems. First the .xap file gets added to source control as well. The problem is that this file is read only for most scenarios. If I get latest for a desktop build the Silverlight Application builds but fails to copy the .xap file to the Web Project. Ditto for the Team Build.
I have gotten around this problem by removing the Silverlight Application reference from the WebProject. Add an xcopy command to the Silverlight Application copy the .xap from the Silverlight Application to the \ClientBin folder of the Web Project.
The problem with this is that removing the Silverlight Applicaton reference destroys the ability to get latest and build locally.
Is there a way to put the .xap file under source control but force an overwrite? Both locally and on the Team Build.
Sharpester
Answers
Hi Sharpester,
I think the best way is to exclude the .xap files from source control.
The exclude file types are defined in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\AddOptions\ExcludeMasks, the default value like Debug;Release;*.pdb;*.obj;*.dll;*.exe;*.res;*.resources;*.cache;*.ilk;*.ncb;*.lce;*.pngYou can add ”;*.xap” to this string. and then restart VS.
If the file *.xap is already checked-in source control, delete it in source control explorer.
If the file *.xap is already include in pending changes with ”add” for the first time, undo this item. After you do step1, it will never appear in pending changes again.
Best Regards,
Ruiz
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi- Marked As Answer byRuiz YiModeratorFriday, November 13, 2009 8:55 AM
All Replies
Hi Sharpester,
I think the best way is to exclude the .xap files from source control.
The exclude file types are defined in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\AddOptions\ExcludeMasks, the default value like Debug;Release;*.pdb;*.obj;*.dll;*.exe;*.res;*.resources;*.cache;*.ilk;*.ncb;*.lce;*.pngYou can add ”;*.xap” to this string. and then restart VS.
If the file *.xap is already checked-in source control, delete it in source control explorer.
If the file *.xap is already include in pending changes with ”add” for the first time, undo this item. After you do step1, it will never appear in pending changes again.
Best Regards,
Ruiz
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi- Marked As Answer byRuiz YiModeratorFriday, November 13, 2009 8:55 AM


