views:

525

answers:

2

Hi

I have a MOSS solution successfully created in Visual Studio 2005 using VseWss 1.1 I have now tried to upgrade to Visual Studio 2008 to use VseWss 1.3 The upgrade did not raise any errors however now when I try to deploy I get the following error:

The class id 00000000-0000-0000-0000-000000000000 exists in this Solution in both MyGlobals (C:\Code\website\MySolution\MyGlobal.cs) and MyWelcomeLayoutFeatureReceiver (C:\Code\website\MySolution\Modules\MyWelcomeLayout\MyWelcomeLayoutFeatureReceiver.cs). Class id's must be unique for deployment to succeed. The Guid attribute in each of the class files should match the feature id in the feature manifest for that particular feature.

I get the same error when I try to open the WSP view in VS. I have run a search on my files and none of them have a guid containing only zeros. The MyGlobals class is not part of a specific feature but rather is just part of the assembly (so doesn't have a unique guid!!, only the assembly does).

Has anyone had this problem and resolved it or have any tips for the upgrade? Thanks

A: 

I managed to resolve the problem by adding a unique guid attribute above each class declaration. Still a bit strange as when I create a new project I don't need to do this.

Mark
A: 

Thank you. For everyone having the same problem here's solution details:

  1. Add Using System.Runtime.InteropServices; to beginning of code
  2. Create unique GUID using Guid generator ("C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\guidgen.exe")
  3. Just before your class add the following line: [Guid("...your-unique-guid...")]
Gomiunik