Re: VS 2019 X# form design error when select Windows Forms Application Template

We encourage new members to introduce themselves here. Get to know one another and share your interests.
User avatar
gbuebook
Posts: 8
Joined: Wed Jun 09, 2021 8:47 am

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by gbuebook »

Dear X# Developer,

Is there any fixes for following Error when selecting 'Visual Studio 2019' <Windows Forms Application X#> template:

Form Designer Error:
Instances of this error (1)

1. Hide Call Stack

at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

Thank You
Regards
David
Attachments
Image 2.jpg
Image 2.jpg (84.58 KiB) Viewed 519 times
Image 1.jpg
Image 1.jpg (101.72 KiB) Viewed 519 times
User avatar
robert
Posts: 4264
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by robert »

David,

Which version of Visual Studio ?
Which version of X#
Do you have the Xamarin integration enabled inside Visual Studio ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
gbuebook
Posts: 8
Joined: Wed Jun 09, 2021 8:47 am

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by gbuebook »

Dear Robert,

Thank you for your quick reply,

Microsoft Visual Studio Community 2019 - Version 16.10.1
XSharp BV - 2.8.1.12

Regards
David
Attachments
Image 3.jpg
Image 3.jpg (218.81 KiB) Viewed 519 times
Image 4.jpg
Image 4.jpg (91.98 KiB) Viewed 519 times
User avatar
robert
Posts: 4264
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by robert »

David,
You did not answer my question about Xamarin integration, but the picture shows that you have indeed Xamarin installed.
I am not sure if you are really using this, but there is a conflict between our VS integration and Xamarin. Xamarin uses an older version of the Mono.Cecil DLL that is not compatible with the DLL that the X# VS integration depends on.

If you can disable or uninstall the Xamarin extensions inside VS then the Windows Forms editor inside X# projects should work.
We have fixed this in the subscribers build that was released earlier this week.
I don't know yet when the next public release will become available.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
gbuebook
Posts: 8
Joined: Wed Jun 09, 2021 8:47 am

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by gbuebook »

Dear Robert,

I do remove Xamarin and new error appear when I Drag the form design as shown in picture.


regards
David
Attachments
Image 7.jpg
Image 7.jpg (76.47 KiB) Viewed 519 times
Image 6.jpg
Image 6.jpg (88.43 KiB) Viewed 519 times
User avatar
robert
Posts: 4264
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by robert »

David,
I am not sure what you mean with "I Drag the form design as shown in picture."

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
gbuebook
Posts: 8
Joined: Wed Jun 09, 2021 8:47 am

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by gbuebook »

Robert
Enlarging the form the error appear immediately as shown on picture.

David
Attachments
Image 9.jpg
Image 9.jpg (67.91 KiB) Viewed 519 times
Image 8.jpg
Image 8.jpg (61.8 KiB) Viewed 519 times
User avatar
robert
Posts: 4264
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by robert »

David,
When you drag the border to the right then the Windows Forms editor will save the code to the .Designer file and will also create the Form1.resx file.
The message seems to indicate that the file name for the Form1.resx file is not correct.
What is the folder name in which your solution / project is located ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
gbuebook
Posts: 8
Joined: Wed Jun 09, 2021 8:47 am

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by gbuebook »

Robert,

All the folders and files look OK on attached picture

David
Attachments
project.jpg
project.jpg (32 KiB) Viewed 519 times
solution.jpg
solution.jpg (37.18 KiB) Viewed 519 times
form1_resx.jpg
form1_resx.jpg (32.72 KiB) Viewed 519 times
User avatar
robert
Posts: 4264
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: VS 2019 X# form design error when select Windows Forms Application Template

Post by robert »

David,
I am sorry but I cannot read the explorer pictures: too small.
But from what I can see there is a # character in the path. Is that correct ?
I suspect that this character is the cause of the problem:
we are using some validation code (that originally came from Microsoft) that marks the following characters as invalid for path and file names:

Code: Select all

([/:*?"<>|#%])
Apparently the # character should not be in that list...

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply