VS2017 Page is not supported in a Windows Universal project

六月ゝ 毕业季﹏ 提交于 2019-12-24 17:25:03

问题


I have a rather unpleasant problem since yesterday...

I cleared my NuGet chache because I couldn't get a NuGet-Package to work with one of my codes. But it didn't help and instead f***ed up the UWP apps I wrote before that.

I get errors for every element I have in my code like this:

In XAML it's mostly "XXX is not supported in a WIndows Universal project" and in the .cs files its a lot of "Cannot resolve symbol XXX"

How can I repair this?

I can compile and run my code just fine but I can't work with the code when everything gets detected as an error in VS and I can't see my UI while designing it...

I could really need some help here :/


回答1:


Just putting this here... I had the same problem suddenly. Updating the NuGet package for Microsoft.NETCore.UniversalWindowsPlatform fixed it for me instantly.




回答2:


Ok I don't really know why that happend but I found my answer...

I tried restarting VS which didn't solve problem.

I tried restarting my PC which didn't solve problem.

I tried to build my code which didn't solve problembut no errors while building.

I tried to run my code which didn't work but app opens without a problem.

Next step confuses me a bit...

My Code is divided into 2 projects. One for all the XAML files and one for all my code files like Helpers, Converters, Collections...

I opened the NuGet-Manager in the second project and looked for possible updates to my packages. There was an update for the Fody-Package which I installed right away. Now everything seems fine again...even in the XAML project...

I don't understand why it works but it does :/



来源:https://stackoverflow.com/questions/49686433/vs2017-page-is-not-supported-in-a-windows-universal-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!