Wednesday, October 19, 2011

Error in Visual Studio 2010 Packaging a SharePoint 2010 Solution

Was getting an error stating that a file "deploys to the same package location" when packaging a SharePoint 2010 solution in VIsual Studio 2010.

Turns out that the SharePointProjectItem.spdata file (in the module subfolder within the Visual Studio project) had somehow gained duplicate entries for a particular file.
To fix this,
  1. Unload the project in VS (or close the entire solution)
  2. Find the SharePointProjectItem.spdata file in Windows Explorer, and edit in Notepad++ (or your favourite text editor!) to remove the duplicate reference
  3. Reload the project in VS, and select that "Package" action - all then worked for me.

No comments: