简体   繁体   English

UWP C#:在名称空间yyy中找不到名称xxx

[英]UWP C#: The name xxx cannot be found in namespace yyy

I am developing a UWP application using C# and MVVM. 我正在使用C#和MVVM开发UWP应用程序。 Yesterday, I ran the app to test recent changes, and all was fine. 昨天,我运行了该应用程序以测试最近的更改,一切都很好。 Later in the day, I fired up the laptop, opened VS, and now converters and controls are flagging. 当天晚些时候,我启动了笔记本电脑,打开了VS,现在转换器和控件处于标记状态。 Intellisense recognizes and will autofill the namespace and the particular converter, but then gives the blue squiggly line saying it cannot be found. Intellisense会识别并自动填充名称空间和特定的转换器,但随后显示蓝色的波浪线表示找不到。 The same happens with controls. 控件也是如此。

When I try to compile, I get errors saying "The name 'DecimalToTextConverter' does not exist in the namespace 'using.POSClient.Converters' although it clearly does. 当我尝试编译时,出现错误提示“名称'DecimalToTextConverter'在名称空间'using.POSClient.Converters'中不存在,尽管显然存在。

Screenshot of the error(s) 错误的屏幕截图

I have searched for two days looking for an answer to this, and tried all of the suggestions -- primarily changing the target platform back and forth, and closing and opening VS, along with rebooting several times, and even a rollback to a restore point two days before the issue began. 我搜索了两天,以寻找答案,并尝试了所有建议-主要来回更改目标平台,关闭和打开VS,并多次重启,甚至回滚到还原点问题开始前两天。

I do not believe I made any code or setting changes between a viable working code base and the onset of this issue. 我不认为我在可行的代码库和此问题开始之间进行了任何代码更改或设置更改。

I'm stumped. 我很难过。 Any help will be greatly appreciated. 任何帮助将不胜感激。

I don't know what the fix is for this problem, but I did an undo on all changes that had not yet been committed and the error is gone. 我不知道解决此问题的方法是什么,但我撤消了尚未提交的所有更改,并且错误消失了。 If it returns, I will update this post with anything new I learn. 如果返回,我将用我学到的新知识更新此帖子。

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

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