Hi there
I am confronting an issue with the Visual Studio 2019 Designer when used in combination with visual inheritance and .NET 5 Windows
I have a net5.0-windows SDK style WinForms project using Visual Studio 2019 this issue is occuring in all versions I have tried across different PC's, v16.11.1, v16.10.4 and v16.9.5
I also have the .NET 5 SDK v5.0.400 installed which is part of .NET 5 v5.0.9 (yep confusing I know).
Basically any control that does not inherit directly from UserControl cannot be viewed in the Visual Studio designer including a newly created "Custom Control" created straight from the Visual Studio template selection under the WIndow Forms group.
This is a designer error only with no issues in compilation, viewing code, or at runtime.
I have attached an example solution
1/ You should rebuild the solution when you open it as often the designer will not even open controls that are not derived from UserControl if you have not rebuilt the solution. It just seems to ignore the fact you choose "View Designer".
2/ In solution explorer you should in turn right click on each control and choose "View Designer".
Both the CustomControl1 and LabelControl have errors in the designer whilst UserControl1 doest not have errors.
You may get a slightly different error depending on the version of Visual Studio 2019 but I have added 2 png files to the attached zip file that show the errors I was receiving.
Anybody else having the same or similar issues?
Thanks in advance
Geoff
I am confronting an issue with the Visual Studio 2019 Designer when used in combination with visual inheritance and .NET 5 Windows
I have a net5.0-windows SDK style WinForms project using Visual Studio 2019 this issue is occuring in all versions I have tried across different PC's, v16.11.1, v16.10.4 and v16.9.5
I also have the .NET 5 SDK v5.0.400 installed which is part of .NET 5 v5.0.9 (yep confusing I know).
Basically any control that does not inherit directly from UserControl cannot be viewed in the Visual Studio designer including a newly created "Custom Control" created straight from the Visual Studio template selection under the WIndow Forms group.
This is a designer error only with no issues in compilation, viewing code, or at runtime.
I have attached an example solution
1/ You should rebuild the solution when you open it as often the designer will not even open controls that are not derived from UserControl if you have not rebuilt the solution. It just seems to ignore the fact you choose "View Designer".
2/ In solution explorer you should in turn right click on each control and choose "View Designer".
Both the CustomControl1 and LabelControl have errors in the designer whilst UserControl1 doest not have errors.
You may get a slightly different error depending on the version of Visual Studio 2019 but I have added 2 png files to the attached zip file that show the errors I was receiving.
Anybody else having the same or similar issues?
Thanks in advance
Geoff