Value cannot be null. (Parameter 'rootComponent') when use IRootDesigner
See original GitHub issue-
.NET Core Version: .NET 5 updated with VS2019 (Version 16.8.1) community build. net5.0-windows
-
Have you experienced this same bug with .NET Framework?: No
Problem description:
When I create the IRootDesigner myself component, open the deisnger of the component in VS 2019, it shows the error below.
Value cannot be null. (Parameter 'rootComponent')
Call Stack
at Microsoft.VisualStudio.WinForms.Protocol.Endpoints.Sessions.InitializeRootComponentResponse..ctor(IComponent rootComponent, IComponent[] components, String[] componentNames)
at WinFormsSurface.Handlers.Sessions.InitializeRootComponentHandler.HandleRequest(InitializeRootComponentRequest request)
at WinFormsSurface.Requests.RequestHandler`2.WinFormsSurface.Requests.IRequestHandler.HandleRequest(Request request)
Then I create a sample from https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.design.irootdesigner?view=net-5.0 and open the deisgner of RootDesignedComponent
it shows the same error!
The proejct use net5.0-windows as TargetFramework. and the Form1 inherit System.Windows.Forms.Form works fine but not the component!
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
</Project>
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Windows Forms Designer error : Value cannot be null. ...
I am developing an app using C# Windows Forms with framework DevExpress. My IDE are Visual Studio Community 2022. It is all okay....
Read more >"Value cannot be null. Parameter name: instance" error ...
I re-installed Telerik Reporting component, removed and added again DLLs and now is working fine.
Read more >Value cannot be null. Parameter name - designerHost. ...
Hi Folks, I've implemented an XAF win app using SQL Server. I have one class file which contains the objects for the database,...
Read more >SSAS – Error – Value cannot be null. Parameter name: ...
I got the following error as shown below, when I was adding rows into the XML file for the Data Source View.
Read more >california state university, northridge
Thus came around the revised goal and problem to be addressed by this project: to create a program that could communicate with an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks all for the info. I was able to reproduce this. Taking a deeper look now.
I am seeing the exact same behavior. It is very easy to reproduce: (1) Add a new user control (use default name usercontrol1); (2) Hit Shift-F7–user control 1 displays in design mode; so far so good; (3) change
public partial class UserControl1 : UserControl
topublic partial class UserControl1 : SplitContainer
(2) Hit Shift-F7–error:Value cannot be null. (Parameter 'rootComponent')