dotnet watch run FileNotFoundException (System.Runtime 7.0)
After updating Visual Studio, which installed the .NET 7.0 SDK, I can no longer use
dotnet watch run
on my project. I have made no other changes (all target frameworks are still 6.0). dotnet run
works just fine, but when I use dotnet watch run
the solution builds and then fails with the following exception:
I was expecting that the update alone wouldn't break anything, at least until I updated my project(s)... I can't find anything on Google except for creating a global.json
file or possibly changing the target framework, which I do not yet want to do because I want to stick with LTS for this project.1 Reply
@calledude Reinstalled how? I just went to microsoft and installed .net 6.0 SDK, but still nothing. However the error says it's looking for System.Runtime version 7, which I believe the
dotnet watch
command is trying to use based on the error message, and not the actual run
command...