Thursday, 4 July 2013

SharePoint 2007: This solution contains two assemblies with the same name, or the SharePoint server already has an assembly with the specified name

I have been working on a MOSS deliverable for a new client. I configured my Debug properties of the project to point to the target web application, but when I press F5, I get the following message:

This solution contains two assemblies with the same name, or the SharePoint server already has an assembly with the specified name

After a bit of investigation, I found the culprit - I had added a post build event to push the dll into the GAC.

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe" -i "$(TargetPath)"

This meant that Visual Studio 2008 was finding an assembly in the GAC when it was not expecting to find one.

The resolution was:
1. Remove the dll from the GAC
2. Remove the post build event

I could then rerun the deployment and continue fixing my code ....


No comments:

Post a comment