I'm trying to debug a dotnet core project on OSX and keep getting a reference error that it cant find the required library.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/Users/Chris/Google Drive/Repos/project/src/project.api/bin/Debug/netcoreapp1.0'.
WARNING: The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use Microsoft.NETCore.App 1.0.0 or newer. This may be expected if the target process did not run .NET code.
The program '/Users/Chris/Google Drive/Repos/project/project.api/src/project.api/bin/Debug/netcoreapp1.0/project.api.dll' has exited with code 131 (0x00000083).
So I looked in the bin directory and noticed there's an additional directory under netcoreapp1.0 called osx.10.11-x64.
In my launch.json if I add that manually to the program path everything works - I was just wondering if that's normal and if the runtime could be picked up dynamically so I don't have to change the program path for different machines I work on (windows, nix, osx)
Here's a copy of launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/src/project.api/bin/Debug/netcoreapp1.0/osx.10.11-x64/project.api.dll",
"args": [],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "open"
},
"linux": {
"command": "xdg-open"
}
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceRoot}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command.pickProcess}"
}
]
}
User contributions licensed under CC BY-SA 3.0