[SOLVED] Calculator demo doesn't work on VS2017

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
thatrickguy
Posts: 4
Joined: Mon Nov 27, 2017 8:10 am

[SOLVED] Calculator demo doesn't work on VS2017

Postby thatrickguy » Mon Nov 27, 2017 1:41 pm

Hey Folks,
I pulled down and installed the addon for VS2017. It looks like it loaded fine, the project types are available, creating a new Calculator demo appears to work, the MainPage.xaml comes up in the designer.

When I first tried to run it I got
C#/XAML for HTML5: SerializationAssembliesGenerator failed : System.Exception: Could not find the file sgen.exe: please contact support@cshtml5.com or ignore this error by adding the following line to your CSPROJ file: <CSharpXamlForHtml5SkipSerializationAssemblies>True</CSharpXamlForHtml5SkipSerializationAssemblies>
at DotNetForHtml5.Compiler.SerializationAssembliesGenerator.Execute()


I checked the CSPROJ file, and no sign of the "DotNetForHtml5.Compiler.SerializationAssembliesGenerator.Execute" line, so not really sure where to put this skip or what the impact would be for doing so.

sgen is readily available in my .Net framework folders, so I tried switching the .Net Framework version from 4.5 to 4.7.1. the error persisted. I closed and reopened VS, and no error! I ran the app and it worked until it called this method:
private void UpdateDisplay()
{
if (String.IsNullOrEmpty(Display))
{
DisplayBox.Text = "0";
}
else
{
DisplayBox.Text = Display;
}
}

The DisplayBox was null. I added if (DisplayBox != null ) to the line to at least make it run. It opened up, I could see the full screen and option to change layouts, but the displaybox itself remained empty. I hit the launch in browser button, and saw the same behavior. I killed the app, and now I'm seeing the could not find sgen.exe error again. It appears as though I can get it to build and run with this error, but I'm still stuck with either no content or a null reference error in UpdateDisplay.

Any thoughts?

Thanks,
-Rick

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Calculator demo doesn't work on VS2017

Postby JS-Support @Userware » Tue Nov 28, 2017 12:34 am

Hi,

This issue should be fixed in the latest Beta 12.6 (or newer), which you can download from:
http://forums.cshtml5.com/viewforum.php?f=6

Can you please confirm that it is fixed for you?

Thanks.
Regards,
JS-Support

thatrickguy
Posts: 4
Joined: Mon Nov 27, 2017 8:10 am

Re: Calculator demo doesn't work on VS2017

Postby thatrickguy » Tue Nov 28, 2017 6:58 am

Excellent, compiling and running flawlessly now! Might I suggest updating the download link on the email that gets sent out?

Thanks,
-Rick

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Calculator demo doesn't work on VS2017

Postby JS-Support @Userware » Tue Nov 28, 2017 7:00 am

thatrickguy wrote:Excellent, compiling and running flawlessly now! Might I suggest updating the download link on the email that gets sent out?

Thanks,
-Rick

Thanks!


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 2 guests

 

 

cron