Visual Studio意外在加载时添加功能 [英] Visual Studio Unexpectedly Adding Feature on Load

查看:100
本文介绍了Visual Studio意外在加载时添加功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2013中有一个SharePoint 2010解决方案.每次我关闭并重新打开Visual Studio时,都会向解决方案添加一项新功能,其中包含一个列表.该列表已从应包含的其他功能中删除.它始终是相同的列表.打开解决方案后,在执行任何操作之前,它会在输出"窗口中弹出...

I have a SharePoint 2010 solution in Visual Studio 2013. Every time I close and reopen Visual Studio, a new feature is added to the solution with one list inside it. The list was removed from another feature that it should be in. It is always the same list. As soon as I open the solution this pops up in the Output window before I do anything...

A new feature Feature2 has been added to the project Solution
C:\Code\Solution\Package\Package.package (0,0): Added Feature2 to Package

A new feature Feature2 has been added to the project Solution
C:\Code\Solution\Package\Package.package (0,0): Added Feature2 to Package

是什么原因造成的?

我尝试了以下操作:

  1. 重新创建解决方案并复制所有文件-不变
  2. 检查了软件包和项目清单. -一切都很好.
  3. 以各种不同的方式加载项目,包括卸载和重新加载命令. -没有变化
  4. 重新创建了自己喜欢的列表,将其隔离为自己的功能-无需更改
  5. 重新创建了列表应具有的功能,但它仍在继续移动至此新功能-无需更改
  6. 添加了新列表并将其放在功能中的问题列表之后- VS然后创建了3个新功能!它从我的功能中删除了3个列表,并在每个功能中都添加了一个.我想我很生气.
  1. Recreated the solution and copied all files over - No change
  2. Checked the package and project manifest. - Everything looks okay.
  3. Loaded the project every different way, including unload and reload command. - No change
  4. Recreated the list it likes to isolate into its own feature - No change
  5. Recreated the feature the list should be in but it keeps moving to this new feature - No change
  6. Added a new list and put it after the problem list in the feature - VS then created 3 new features! It took 3 lists out of my feature and put one in each of its own features. I guess I made it angry.

推荐答案

如果同一功能中的列表具有相同的类型ID,则该工具会将列表移至新创建的功能中,因为类型在特征.您可以查看 ListTemplate元素上的文档,以了解更多信息信息.

If the lists in the same feature have the same Type ID, the tooling will move the lists into a newly created feature, because the Type must be unique within a feature. You can check the documentation on the ListTemplate element for more information.

这篇关于Visual Studio意外在加载时添加功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆