3

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.

I want to open the projectname.sln file and update the file path manually.

My current workaround is to right click .sln file and open with VS Code. Do my edits and then save. After saving it causes a trigger to reload in Visual Studio

Roger Perez
  • 2,807
  • 29
  • 31
  • How would VS know that you had renamed the folder/file? – stuartd Feb 06 '20 at 23:55
  • @stuartd that's his point - he wants to tell VS about it! – see sharper Feb 06 '20 at 23:56
  • Hmm. Not sure there's anything like that. Could the path be stored as an environment variable? Then when you change the path, just update the variable. Could maybe have a little batch file or PS script within the path which updates it with the current directory. But I'm wondering, why is the path changing so often that this is a problem? – stuartd Feb 07 '20 at 11:12

1 Answers1

3

You have to unload project by right-clicking on the project.

Once unloaded you can right-click and edit project.csproj.

Update the paths that are causing the problem.

Save and reload.

Roger Perez
  • 2,807
  • 29
  • 31