I had this happen with .NET 6.0 where somehow the appname.runtimeconfig.json file was not being generated in the bin/Debug/net6.0/ directory.
The fix was modifying the .csproj file and include this fragment inside the <PropertyGroup> element:
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile>
I found this solution while searching with https://www.google.com/search?q=net60+runtimeconfig.dev.json at Breaking change: runtimeconfig.dev.json file not generated – .NET | Microsoft Learn with the solution at MSBuild properties for Microsoft.NET.Sdk – .NET | Microsoft Learn:
GenerateRuntimeConfigDevFile
Starting with the .NET 6 SDK, the [Appname].runtimesettings.dev.json file is no longer generated by default at compile time. If you still want this file to be generated, set the
GenerateRuntimeConfigDevFileproperty totrue.<PropertyGroup> <GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile> </PropertyGroup>
After applying this to the .csproj file and re-building the project, debugging from Visual Studio Code worked fine including stopping at the breakpoints that I had set previously.






Leave a comment