[英].NET Core 1.1 build and class recognition bug on Visual Studio 2017
I have recently started developing a test project on the latest .NET Core version 1.1 and I have been experiencing considerable amount of issues though most of them could be solved by browsing the web. 我最近开始在最新的.NET Core版本1.1上开发测试项目,尽管大多数问题都可以通过浏览Web来解决,但是我遇到了很多问题。 I am currently using Visual Studio 2017 community .
我当前正在使用Visual Studio 2017社区 。
There is one particular annoying bug which involves the following (some steps to reproduce it): 有一个特别令人讨厌的错误,涉及以下内容(重现该错误的一些步骤):
I have to say that sometimes for unknown reasons even if I follow properly all the mentioned steps above the trick is not going to work and I have to reopen and build several times. 我不得不说,有时即使出于正确的原因,即使我正确地执行了上述所有步骤,此技巧仍无法正常工作,因此我不得不重新打开并构建几次。 There was a similar project build issue on .NET Core 1.0 as well (proper building only works by using the CLI ).
.NET Core 1.0上也存在类似的项目构建问题(正确的构建只能通过使用CLI进行 )。
One issue I also notice in the 1.1 version is that after you create a new folder anywhere in the solution this folder will not appear in the .csproject file (in the ItemGroup xml tag) which also should not happen. 我在1.1版本中还注意到的一个问题是,在解决方案中的任何位置创建新文件夹后,该文件夹将不会出现在.csproject文件(位于ItemGroup xml标记中)中,这也不应该发生。 Basically it seems that the .csproj file is not reflecting any changes done to the solution.
基本上, .csproj文件似乎没有反映对解决方案所做的任何更改。
Could all of that be a caching issue ? 所有这些都可能是一个缓存问题吗?
So far the .NET Core technology has been really impressive to me clearly showing a brighter future for developers however I have been experiencing enormous amount of troubleshooting issues especially in the latest 1.1 version. 到目前为止,.NET Core技术确实给我留下了深刻的印象,为开发人员带来了光明的未来,但是我一直在遇到大量的故障排除问题,尤其是在最新的1.1版本中。
Regards, RF 问候,RF
Solution found: 找到解决方案:
I managed to find the source of the issue. 我设法找到问题的根源。 It seems that in Visual Studio 2017 a new option has been implemented called Lightweight solution load and this option is causing the issue of not recognizing new classes and references.
似乎在Visual Studio 2017中实现了一个称为``轻量级解决方案加载''的新选项,此选项导致无法识别新类和引用的问题。 Once I switched it off it worked as intended.
一旦关闭它,它就会按预期工作。 The Lightweight Solution Load option button appears next to the Open Folder in File Explorer and you might accidentally click it.
“ 轻量级解决方案加载”选项按钮显示在“文件资源管理器”中的“ 打开文件夹 ”旁边,您可能会意外单击它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.