简体   繁体   English

Windows Universal项目不支持VS2017页面

[英]VS2017 Page is not supported in a Windows Universal project

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. 我清除了NuGet缓存,因为我无法使用NuGet软件包来处理我的代码之一。 But it didn't help and instead f***ed up the UWP apps I wrote before that. 但这并没有帮助,反而使我之前编写的UWP应用程序瘫痪了。

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" 在XAML中,主要是“ WINDows Universal项目不支持XXX”,而在.cs文件中,它的含义很多是“无法解析符号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... 我可以很好地编译和运行我的代码,但是当所有内容都被检测为VS中的错误并且在设计时看不到我的UI时,我将无法使用该代码。

I could really need some help here :/ 我真的需要一些帮助:/

Just putting this here... I had the same problem suddenly. 只是把它放在这里...我突然遇到了同样的问题。 Updating the NuGet package for Microsoft.NETCore.UniversalWindowsPlatform fixed it for me instantly. 更新Microsoft.NETCore.UniversalWindowsPlatform的NuGet程序包后,立即为我修复了它。

Ok I don't really know why that happend but I found my answer... 好的,我真的不知道为什么会这样,但是我找到了答案...

I tried restarting VS which didn't solve problem. 我尝试重新启动无法解决问题的VS。

I tried restarting my PC which didn't solve problem. 我尝试重新启动无法解决问题的PC。

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. 我的代码分为2个项目。 One for all the XAML files and one for all my code files like Helpers, Converters, Collections... 一个用于所有XAML文件,另一个用于我所有的代码文件,例如Helpers,Converters,Collections ...

I opened the NuGet-Manager in the second project and looked for possible updates to my packages. 我在第二个项目中打开了NuGet-Manager,并寻找可能的软件包更新。 There was an update for the Fody-Package which I installed right away. 我立即安装了Fody-Package的更新。 Now everything seems fine again...even in the XAML project... 现在一切似乎再好了...即使在XAML项目中...

I don't understand why it works but it does :/ 我不明白为什么会这样,但它确实是:/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM