NSwag build error – Project file does not exist / Unable to retrieve project metadata


While working on a project that used NSwag, when the solution was built, Visual Studio (and dotnet build from the command line) reported the following error: View the code on Gist. Pretty frustrating, as it wasn’t clear what the error meant. This project used NSwag.MSBuild to generate the client on build. As per their documentation, we had an after build target: View the code on Gist. The problem...