0
votes

I have a .Net Core API that runs fine on my mac if I use dotnet run . However if I try to run and debug with VSCode, I get the following error:

dyld: loaded: /usr/local/share/dotnet/shared/Microsoft.NETCore.App/3.1.4/System.Globalization.Native.dylib Unhandled exception. System.MissingMethodException: Entry point not found in assembly 'GraphQL, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null'.

I've verified that my project's .cproj and runtimeconfig.json are similar to other projects I normally debug with VSCode.

Given that it runs fine with the dotnet run command via the VSCode terminal, could there be something missing with my launch.json?

My Launch.json My Launch.json

My Terminal with the error -> not very descriptive

enter image description here

1

1 Answers

0
votes

OK, so I missed that the build using the csproj (that VSCode uses) produces a dll with a slightly different name that when I build and run via the terminal. Changing the "program" path in the launch.json to the dll that is produced from the VSCode build action resulted in the smooth runs I am accustomed to. I only realized this by checking the latest files produced when a build with VSCode's task is ran.