简体   繁体   English

Visual Studio 2019 无法识别从 GitHub 提取的新文件

[英]Visual Studio 2019 not Recognizing new Files Pulled from GitHub

I am working in a team with a project where GitHub is used.我在一个使用 GitHub 的项目的团队中工作。 The project type is Google Gloud Project MVC5 .NET Framework 4.5.2.项目类型为 Google Gloud Project MVC5 .NET Framework 4.5.2。

When new changes are pulled down from GitHub, the new files are not detected as the correct filetype, resulting in the Visual Studio code validation being completely abscent when editing the new files.当从 GitHub 中提取新更改时,新文件不会被检测为正确的文件类型,从而导致在编辑新文件时完全没有 Visual Studio 代码验证。

As seen in the picture, the issue concerns .cshtml files with Razor code but also .cs files.如图所示,该问题涉及带有 Razor 代码的.cshtml文件以及.cs文件。 解决方案资源管理器。甚至需要单击“显示所有文件”才能在解决方案资源管理器中查看文件。

As Guru Stron suggested, the old .csproj was not committed (The project was made in VS17 but we are now all using VS19.正如 Guru Stron 所建议的那样,旧的.csproj没有提交(该项目是在 VS17 中制作的,但我们现在都在使用 VS19。

The issue was resolved by commiting the .sln file and the .csproj file from the instance where the most recent changes had been created.该问题已通过从已创建最新更改的实例提交.sln文件和.csproj文件得到解决。

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

相关问题 为什么 Visual Studio 2019 会删除对新 .razor 文件的监视? - Why does Visual Studio 2019 remove watch for new .razor files? Visual Studio 2019 中没有 GitHub 的连接选项 - No connection option for GitHub in Visual Studio 2019 在Visual Studio的新解决方案中使用来自github的Boostrap模板 - Using Boostrap template from github in a new solution in Visual Studio 列出 Visual Studio 2019 中未引用的文件? - List unreferenced files in Visual Studio 2019? 新的 Visual Studio 2019 中的环境变量为空,但 Visual Studio 2017 中的环境变量为空 - Environment variables null in new Visual Studio 2019 but not Visual Studio 2017 Visual Studio 2013无法识别对我的新模型的引用? - Visual Studio 2013 not recognizing reference to my new Model? 将Visual Studio 2017解决方案从一个GitHub帐户移动到新的Github帐户的问题 - Issues with Moving Visual Studio 2017 Solution from one GitHub account to a new Github account 如何从 Visual Studio 2019 导出程序? - How to export a program from Visual Studio 2019? 在 Visual Studio 2019 中添加新数据源失败 - Add new Data source in Visual Studio 2019 Faild Visual Studio 2019无法将新文件添加到我的项目中 - Visual Studio 2019 fails to add a new file to my project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM