Invalid markup error [SOLVED]

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
RichardLosper
Posts: 2
Joined: Tue Jun 07, 2016 4:12 am

Invalid markup error [SOLVED]

Postby RichardLosper » Tue Jun 07, 2016 4:24 am

Hi,

I have just installed Beta 8 into VS 2015 Community version. This may well be a noob question but when I open the sample calculator app or start a new blank project I get the following errors:

Invalid Markup - check the error list for more information

Errors:
Page is not supported in a WPF project
Canvas is not supported in a WPF project
Textblock is not supported in a WPF project

The sample app does compile and run in my browser, which in itself is strange given the errors.

Please help
Regards,
Richard

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

Re: Invalid markup error

Postby JS-Support @Userware » Tue Jun 07, 2016 4:42 am

Hi,

1. Do the errors remain also when you close any open XAML Editor tab ?

2. What is the exact version/update number of your VS 2015 version? (you can read it from the menu Help -> About Microsoft Visual Studio)

Thanks,
Regards,
JS-Support

RichardLosper
Posts: 2
Joined: Tue Jun 07, 2016 4:12 am

Re: Invalid markup error

Postby RichardLosper » Tue Jun 07, 2016 11:33 am

Hi and thanks for the quick response.

My VS2015 info is as follows:
Microsoft Visual Studio Community 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01055
Installed Version: Community

I am not sure what you mean by "Do the errors remain also when you close any open XAML Editor tab ?"
These are not build errors but unknown xaml keywords. They extend to other xaml windows as well for example

In your Calculator1 app, when I open app.xaml I get these errors:
Application is not supported in a WPF project
ResourceDictionary is not supported in a WPF project

As I say, I am mystified as to how the project builds with these xaml errors.

Regards,
Richard

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

Re: Invalid markup error

Postby JS-Support @Userware » Wed Jun 08, 2016 6:21 am

Thank you Richard for the response.

OK, we are going to try to reproduce and fix those issues.

It seems that the XAML Editor raises some errors which are misleading. You can safely ignore them.

To see only the "real" errors, close any open XAML document, and recompile the project. Only the relevant errors will appear.

Thanks.
Regards,
JS-Support

xidea
Posts: 33
Joined: Thu Jun 30, 2016 7:04 pm

Re: Invalid markup error

Postby xidea » Thu Jun 30, 2016 7:12 pm

Hello,

same problem.

There's no way to show the rendered XAML in the design view, so it's hard to implement the event handlers by clicking on the objects (that doesn't appear!)
The design windows reports simply an "Invalid Markup" error, ant Page, Grid, Canvas, Image, etc. are indicated as "not supported" tags.

[edit]

Found the solution: you must reference these Framework's assembly:

WindowsBase
PresentationCore
PresentationFramework


Flavio

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

Re: Invalid markup error

Postby JS-Support @Userware » Fri Jul 01, 2016 2:15 am

Hi!

Can you please try with the new Beta 8.3, available at the following URL:

http://forums.cshtml5.com/viewtopic.php?f=6&t=5492

Thank you.
Regards
JS-Support

xidea
Posts: 33
Joined: Thu Jun 30, 2016 7:04 pm

Re: Invalid markup error

Postby xidea » Fri Jul 01, 2016 9:07 am

Yeah, well done!

But, I can't view the Images rendered in the Design View. I'm using this path for sources:

Source = "ms-appx:/Assets/image.png"

and the images are rendered correctly in simulator and web browser, but in Design View nothing appears (no way, neither using "ms-appx:///MyAssemblyName/Asset/..." path, that worked in 8.2.

Thanks

Flavio

PS I'm a VB.NET veteran, but I'm learning (eventually) to code in C# trying to port my game on a web platform. This is a good chance. Great!

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

Re: Invalid markup error

Postby JS-Support @Userware » Sat Jul 02, 2016 8:04 am

Thanks Flavio.

Glad it fixed the "markup error" issue!

(As for the images in the designer, we are aware of it and will provide a fix in an upcoming build.)

Thanks again!

Regards
JS-Support


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 47 guests

 

 

cron