I have dotnet version 5.0.101. When I create a new console application in PowerShell using the command:
dotnet new console
and open that file in Visual Studio 2019, if I try to start debugging, this error is always thrown:
"An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module. Could not load file or assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."
If I open the same file in Visual Studio Code, debugging works.
If I just build the file from Visual Studio 2019, it builds successfully and I can run the application.
If I create a new console application through Visual Studio, debugging works.
Is a special file that isn't created when I create a new console app through PowerShell that would otherwise be created through Visual Studio? I'm not sure why just the debugger can't run, seems to be an error with versions??