简体   繁体   English

如何在 Visual Studio 2019 中更新 .sln(解决方案)文件

[英]How to update .sln (solution) file within Visual Studio 2019

I am clean build -ing and rebuild -ing the project I am working with and I keep getting errors that is is unable to find the path/folder/filename because I ended up updating the name within file explorer.我正在清理我正在使用的项目的buildrebuild ,但我不断收到无法找到路径/文件夹/文件名的错误,因为我最终在文件资源管理器中更新了名称。

I want to open the projectname.sln file and update the file path manually.我想打开projectname.sln文件并手动更新文件路径。

My current workaround is to right click .sln file and open with VS Code.我目前的解决方法是右键单击.sln文件并使用 VS Code 打开。 Do my edits and then save.做我的编辑然后保存。 After saving it causes a trigger to reload in Visual Studio保存后会导致触发器在 Visual Studio 中重新加载

You have to unload project by right-clicking on the project.您必须通过右键单击unload projectunload project项目。

Once unloaded you can right-click and edit project.csproj .卸载后,您可以右键单击并编辑project.csproj

Update the paths that are causing the problem.更新导致问题的路径。

Save and reload.保存并重新加载。

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

相关问题 从Win Form应用程序运行SLN文件(Visual Studio解决方案) - Run SLN file (visual studio solution) from win form application 以编程方式获取与Visual Studio解决方案文件(* .sln)中的GUID相匹配的Assembly GUID - Getting Assembly GUID programmatically that matches that in Visual studio solution file (*.sln) 使用Visual Studio 2019构建现有的Sln失败 - Building existing sln fails with Visual Studio 2019 如何以编程方式在当前打开的Visual Studio IDE中打开.sln文件? - How to open a .sln file in the current open Visual Studio IDE programmatically? 怎么开 <visualStudioProject> Visual Studio 2012中的.sln TXT文件 - How to open <visualStudioProject>.sln TXT file in visual studio 2012 有什么方法可以先在Visual Studio 2017中创建空白解决方案(.sln)文件,然后添加项目? - Is there any way to create a blank solution (.sln) file first in Visual Studio 2017 and then add projects? 如何在 Visual Studio 2019 中更新 Gradle - How to update Gradle in visual studio 2019 如何以编程方式创建Visual Studio解决方案(.sln)文件,包括网站项目? - How to create Visual Studio Solution (.sln) files programmatically, including Website projects? 在Visual Studio中将解决方案.sln文件存储在哪里? - Where to store solutions .sln file in Visual Studio? 如何在 Visual Studio 2019 中添加 .mdf 文件? - How to add .mdf file in Visual Studio 2019?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM