Form inheritance in Visual Studio 2008 doesn't work

て烟熏妆下的殇ゞ 提交于 2019-12-13 01:28:24

问题


Is there a way to fix "The service Microsoft.VisualStudio.Shell.Interop.ISelectionContainer already exists in the service container. Parameter name: serviceType" in VS2008? I just create an empty form, then create form that inherits the first one. When I try to open the inherited form, this message appears.

Update:

  1. Tried restarting VS
  2. Tried rebuilding solution
  3. Tried re-creating these forms

Doesn't help.


回答1:


Try rebuild first and then create derived form. The VS winforms designer instantiate base class and after that parse the "InitialzeComponents" and add controls on it.



来源:https://stackoverflow.com/questions/6841246/form-inheritance-in-visual-studio-2008-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!