-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Description
After installing VS 17.4, I can't run dotnet watch for .NET6 projects
Reproduction Steps
- Make sure you have .NET 6 SDK and runtime installed
- Install Visual Studio 17.4 - it will install .NET 7 (FYI: one of my colleagues lost .NET 6 SDK after installing VS 17.4...)
- Run
dotnet watchon one of your projects with<TargetFramework>net6.0</TargetFramework>inside csproj
Expected behavior
It will run without any problem
Actual behavior
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Nie można odnaleźć określonego pliku.
File name: 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext)
at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at System.Reflection.Assembly.GetType(String name, Boolean throwOnError)
at System.StartupHookProvider.CallStartupHook(StartupHookNameOrPath startupHook)
at System.StartupHookProvider.ProcessStartupHooks()
dotnet watch ❌ Exited with error code -532462766
Regression?
Yes
Known Workarounds
global.json:
{
"sdk": {
"version": "6.0.302"
}
}
Configuration
- .NET 6 project
- Windows
- x64
Other information
Installed both .NET 6 and .NET 7 SDK and runtime