xsharp.eu • Re: VS 2019 X# form design error when select Windows Forms Application Template
Page 1 of 2

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

Posted: Fri Jun 11, 2021 8:45 am
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

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

Posted: Fri Jun 11, 2021 8:52 am
by robert
David,

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

Robert

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

Posted: Fri Jun 11, 2021 9:06 am
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

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

Posted: Fri Jun 11, 2021 9:15 am
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

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

Posted: Fri Jun 11, 2021 9:31 am
by gbuebook
Dear Robert,

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


regards
David

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

Posted: Fri Jun 11, 2021 10:03 am
by robert
David,
I am not sure what you mean with "I Drag the form design as shown in picture."

Robert

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

Posted: Fri Jun 11, 2021 10:17 am
by gbuebook
Robert
Enlarging the form the error appear immediately as shown on picture.

David

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

Posted: Fri Jun 11, 2021 10:54 am
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

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

Posted: Fri Jun 11, 2021 12:34 pm
by gbuebook
Robert,

All the folders and files look OK on attached picture

David

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

Posted: Fri Jun 11, 2021 12:44 pm
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