SharePoint - 如何将VSEWSS解决方案从VS2005升级到VS2008

时间:2009-07-07 21:03:21

标签: visual-studio sharepoint moss upgrade vsewss

我使用VseWss 1.1在Visual Studio 2005中成功创建了MOSS解决方案 我现在尝试升级到Visual Studio 2008以使用VseWss 1.3 升级没有引起任何错误,但是现在当我尝试部署时,我收到以下错误:

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.

当我尝试在VS中打开WSP视图时出现相同的错误。 我已经对我的文件进行了搜索,但没有一个只包含零的guid。 MyGlobals类不是特定功能的一部分,而只是程序集的一部分(因此没有唯一的guid !!,只有程序集才有。)

是否有人遇到此问题并已解决或有任何升级提示? 感谢

2 个答案:

答案 0 :(得分:1)

谢谢。对于每个人都有相同问题的解决方案详情:

  1. Using System.Runtime.InteropServices;添加到代码开头
  2. 使用Guid生成器创建唯一GUID(“C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ bin \ guidgen.exe”)
  3. 在您的课程之前添加以下行: [Guid("...your-unique-guid...")]

答案 1 :(得分:0)

我设法通过在每个类声明上面添加一个唯一的guid属性来解决问题。还有点奇怪,因为当我创建一个新项目时,我不需要这样做。