Hi there
I am having issues viewing my controls in the VIsual Studio 2019 16.10.4 where I am compiling against Infragistcs 2021.1 v 21.1.32-ci
This is in a C# WinForms app targeted at net5.0-windows
Basically none of my controls will display in the designer without errors.
The controls all compile fine and are all usable at runtime, the issue occurs only in the control designer and for even the most basic of controls i.e. a panel that inherits from the UltraPanel and does nothing else
The errors are always the same across all controls.
I have attached the control and a screenshot of the error.
Any ideas would be greatly appreciated.
Regards
Geoff
Hi again
It looks to me like there is an issue with Visual Inheritence in .NET 5 that is NOT there for .NET Framework 4.6.2 when using Infragistcs 2021.1 v 21.1.32-ci
Any control that derives from Infragistics seems to have an issue in .NET 5 whilst there is no issue with .NET 4.6.2
In the attached sample you can see that RamesysPanel has the errors when loading in design view of VS 2019 v16.10.4
where as the UserControl1 control which derives from UserControl has no such issue.
Thanks
WinFormsApp1.zip
Hello Geoff,
I have updated your sample to reference the official release version 21.1.24 instead of 21.1.32-ci.
Can you please test to see if this works in your environment?
Please note that there are still some issues we are currently working on to support Visual Studio version 16.10.
WinForms on Visual Studio 16.10https://es.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/123150/winforms-on-visual-studio-16-10
WinFormsApp1_mod.zip
Thanks for the reply
I am a bit confused here, I was under the impression that in order to use 2021.1 against Visual Studio 2019 16.10 or later that I needed to use 21.1.32-ci but you are saying here I should try against 21.1.24.
I have NO option to downgrade my Visual Studio 2019 to 16.9.x so can you please tell me which version of 2021.1 I should be using against Visual Studio 2019 16.10 or later?
I tried your sample solution against Visual Studio 2019 Community Edition v16.9.2 and got the attached error when opening the RamesysPanel control in design view.
Again please see my comments above about the confusion around Visual Studio and Infragistics versions
The supported version for Visual Studio 2019 is 16.9.4 or later as noted in the document below.
What’s New in 2021 Volume 1.NET Core Designer Supporthttps://es.infragistics.com/help/winforms/whats-new-in-2021-volume-1
I haven't been able to reproduce the error you described. Can you please provide the exact steps to reproduce the error you are seeing with Visual Studio 2019 16.10.4?
Hi Mike
Thanks for the reply.
Yeah that is exactly the conclusion I came to myself thru trial and error.
Interestingly the CustomControl that is available from the Visual Studio "Add New Item" templates derives also from Control and gets a designer error straight out of the box!
I raised this on both Github and Visual Studio Developer Community and both say it is a known issue that is being investigated.
Thanks again
Hi Geoff, So I have good news and bad news. I tried this out with v 21.1.32-ci and I am seeing the same exception you are getting: the NullReferenceException.Then I tried this same thing with our latest internal build and I do not get that exception any more. So it looks like this will be fixed in the next service release. That's the good news. The bad news is that it looks like Visual Studio doesn't show a designer for Control-derived classes in Net Core. In DotNet Framework, they do. But in Net Core, they only show a designer surface for classes that derive from Form or UserControl. You can see this by creating a class that derives from Control. When I do this, I get an error message that there are no classes to be designed.
Hi Mihoko
Great, thanks for that, please keep me informed.
Okay.. ignore the comments above. I finally realized that you are not right-clicking on the control on the form, but rather on the File in the Solution Explorer. I tried this out with the latest ci build (32-ci) that you are using and I can reproduce the issue.
But when I try this with the latest internal version of the controls, I do not get the Exception. So it looks like this will be fixed in the next ci build or service release.
However, even once that NullReferenceException is fixed, you still can't design the control, because Visual Studio gives me a different exception:
"The designer could not be shown for this file because none of the classes within it can be designed."
But it looks like this is an issue with Visual Studio and not our controls, because I can reproduce the same issue with a control that is derived from Control, instead of UltraPanel. So there's nothing we can do about that.
So it appears that the VS Designer will only allow you to design certain classes like UserControl or Form and not classes that are derived from Control or other base classes like they do in DotNet Framework applications.
I'm confused. Neither UltraPanel, nor the UserControl, nor the derived UltraPanel control have an option for "View Designer" on the context menu. I tried the "About" and "Custom Property Page" options, which are the only ones specific to UltraPanel that we provide and they are both working fine for me, at least with our latest internal build.
Am I missing something?
EDIT: Just to be extra thorough here, I tried it again with v21.1.32-ci and I still do not see a "View Designer" option on the context menu.