Visual Studio 2010: some entries in the Error List are not Errors, Warnings or Messages, but are still indicating a problem
Posted by jpluimers on 2011/04/06
The below message in my Error List is not an error: it has a red exclamation mark, which falls outside the category Error (Red bullit with white cross), Warning (Yellow triangle with black exclamation mark) or Message (White bullet with blue lowercase i).
Bit it is still indicatint something was wrong:
1 Failed to copy project output to file C:\tfs.root\MyServiceApplication\ClientBin\MySilverlight.Client.Test.xap. Access to the path ‘C:\tfs.root\MyServiceApplication\ClientBin\MySilverlight.Client.Test.xap’ is denied. 0 0 MyServices
What it indicates is that the .xap file is readonly, and cannot be overwritten.
The reason is that during checkin in TFS, by accident all the .XAP files were added (by default, .XAP files are not on the binary exclusion list), and I found the answer in this thread.
At the end of the build process, the above message disappeared, but the .XAP file was not replaced, so the project output was not up-to-date.
Ergo: the build should have failed.
The solution was simple:
- Remove the .XAP files from TFS
- Delete the read-only .XAP files from disk
- Rebuild
Now Visual Studio 2010 can regenerate the .XAP files and your project output is correct again.
NB: .XAP files can be in two places, be sure to check both:
- The bin\debug or bin\release folder of a SilverLight project
- The ClientBin folder of an ASP.NET web project
–jeroen






Leave a comment