问题
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:
- Tried restarting VS
- Tried rebuilding solution
- 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