... is not supported in a Windows Presentation Foundation (WPF) project

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
Andreas
Posts: 4
Joined: Mon Dec 03, 2018 3:30 am

... is not supported in a Windows Presentation Foundation (WPF) project

Postby Andreas » Mon Dec 03, 2018 4:19 am

Hi Folks,

I am receiving the message "... is not supported in a Windows Presentation Foundation (WPF) project" in VS 2017 designer. This happens for new projects as well as the sample show case. It works at the start for a while, but then (with no obvious trigger), the issue kicks in.
CSHTML5 version: 1.2.125.181115.

Thanks,
Andreas

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

Re: ... is not supported in a Windows Presentation Foundation (WPF) project

Postby JS-Support @Userware » Mon Dec 03, 2018 4:34 am

Hi,

Please double-check that:
- The "Build Action" of all your XAML files is "Content" instead of "Page". To see/change the "Build Action", just select a XAML file in the Solution Explorer and press F4 to see its properties.
- Your project does not any reference to "System" or other assemblies which name starts with "System.*"

Usually the first point fixes the issue. Please let us know if it doesn't.

Thanks.
Regards

Andreas
Posts: 4
Joined: Mon Dec 03, 2018 3:30 am

Re: ... is not supported in a Windows Presentation Foundation (WPF) project

Postby Andreas » Mon Dec 03, 2018 5:23 am

Hi,

Thanks for the quick reply.
For my own project: no Build action was set to "Page", all the xaml files have the build action set to "Content" and no System.* reference is added. So this is not the root cause.
For your sample showcase project: most xaml files are set to "Page" instead of "Content". I haven't changed them as there are quite a lot and referring to my own project, I don't think this will fix it.

See attached screenshots from the project file.

Thanks,
Andreas
Attachments
sc from test project.PNG
sc from test project.PNG (31.6 KiB) Viewed 47 times
sc from sample showcase.PNG
sc from sample showcase.PNG (24.23 KiB) Viewed 47 times

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

Re: ... is not supported in a Windows Presentation Foundation (WPF) project

Postby JS-Support @Userware » Mon Dec 03, 2018 7:28 am

Hi,

Thanks for the reply.

1. Does the project compile properly?

2. Does the error also appear if you close all the open tabs (ie. all the open documents) and rebuild?

Thanks.
Regards

Andreas
Posts: 4
Joined: Mon Dec 03, 2018 3:30 am

Re: ... is not supported in a Windows Presentation Foundation (WPF) project

Postby Andreas » Mon Dec 03, 2018 7:52 am

Hi,

Yes, the project compiles properly.
I tried close all open tabs and recompiled and that seems to have solved it temporarily.
It seems to come back randomly. Say I have multiple xaml and cs files open, I'm working on some cs code and then switch to a xaml file, I receive the error. It's hard to reproduce as it seems random.
I will try and see if the closing of tabs and recompile workaround helps for now.

Thanks,
Andreas


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 0 guests

 

 

cron