Hi, I have a relativity small Vulcan app that I am having trouble porting to X#. I ran the porter and the xxx-XS.Sln file was successfully created. When I open the solution, VS 2015 doesn't display the Start button instead the Attach... button is displayed. I'm not sure how to proceed from here. Also, any form I click on doesn't get loaded by the form editor. Instead a message is displayed:
"To prevent possible data loss before loading the designer, the following errors must be resolved:" and "The designer could not be shown for this file because none of the classes within it can be designed." Followed by a bunch of Show Call Stack errors. Any ideas on what I'm doing wrong?
If it helps, I have attached the project.
From what I see, the problem is that there's a platform identifier missing in the .xsproj file. But simply by loading and closing the solution, the project system of x# fixes this problem, so the next time you open the solution, building/starting the app will be enabled.
When building you will get 2 warnings (which get converted to errors), either disabling this warning (649) by entering its number in the "Project settings/Build/Suppress specific warnings" project options or setting "Warnings As Errors" to False will allow your code to compile and it will run as expected.
I still see the issue opening the form in the designer though. I don't know what is causing this, will check with Robert about it.
Chris is NOT going to look into this himself.
Visual Studio is really not his thing.
Fabrice and I take care of that.
And I have not found the time to check this yet.
Was too busy with other obligations.
XSharp Development Team
You are right of course, but actually I did have a look
Problem is the font assignment, looks like the codedom chokes on the System.Drawing.FontStyle.* part. Gary, removing the "font" lines for the designer.prg file will allow the form to load in the designer, but I admit this is not a good solution, so I'd suggest to wait for a fix for this.
W.r.t. the xporter: it looks like you have used an older version of the XPorter to convert the Vulcan project to X#. The Xporter.exe in the XSharp.Bin folder should convert everything without problems.
After converting the Vulcan project you should be able to compile and run.
I cannot test the code completely, since I do not have the scanner.
You will have to set 'warnings as errors' on the Build page for the project options to false, because there are 2 warnings for generated code.
I noticed that there was still an older version of XPorter in the downloads section on the website. I have removed that copy.
With regard to the form editor the following:
Your example exposed several problems in the code parser for windows forms:
- it fails when the form.prg or form.designer.prg has methods without parameters
- it fails for constructor parameters of type 'enumerator value' such as the font style
- your code uses font sizes in fractions. This fails on a machine with a decimal separator which is not a comma.
- and more
I am still struggling with the form that shows the pie gauge. The others are working fine now.
I will let you know when I have a solution.
XSharp Development Team