-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[macOS 11 x64] Cannot compile or debug with VSCode for C# Program #7251
Comments
Getting exact same error, different environment. Debug Console (VSCode)Message = Unable to load shared library 'vsdbg' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:
dlopen(/Users/chadams/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/vsdbg.dylib, 1): image not found
dlopen(vsdbg.dylib, 1): image not found
dlopen(/Users/chadams/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/chadams/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib (which was built for Mac OS X 12.0)
Expected in: /usr/lib/libc++.1.dylib
dlopen(libvsdbg.dylib, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/chadams/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib (which was built for Mac OS X 12.0)
Expected in: /usr/lib/libc++.1.dylib
dlopen(/Users/chadams/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/vsdbg, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/chadams/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib (which was built for Mac OS X 12.0)
Expected in: /usr/lib/libc++.1.dylib
dlopen(vsdbg, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/chadams/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib (which was built for Mac OS X 12.0)
Expected in: /usr/lib/libc++.1.dylib
dlopen(/Users/chadams/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg, 1): image not found
dlopen(libvsdbg, 1): image not found
Code = 80131524
at VsDbg.NativeEntryPoint.EnsureInitialized(String[] args)
at VsDbg.Transports.LocalTransport.<Init>b__28_0()
dotnet --info.NET SDK (reflecting any global.json):
Version: 6.0.423
Commit: c5c9e53229
Runtime Environment:
OS Name: Mac OS X
OS Version: 11.7
OS Platform: Darwin
RID: osx.11.0-x64
Base Path: /usr/local/share/dotnet/sdk/6.0.423/
Host:
Version: 8.0.6
Architecture: x64
Commit: 3b8b000a0e
.NET SDKs installed:
1.0.1 [/usr/local/share/dotnet/sdk]
6.0.423 [/usr/local/share/dotnet/sdk]
8.0.204 [/usr/local/share/dotnet/sdk]
8.0.300 [/usr/local/share/dotnet/sdk]
8.0.302 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.31 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.31 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set |
The issue is that the debugger now builds on macOS 12 machines as macOS 11 is deprecated for Azure Pipeline Build Agents. The workaround would be to use an older version of the C# Extension starting from v2.33.17 or before or update your macOS to macOS 12. Also .NET 8 only supports macOS 12+ and .NET 6 will be out of support on Nov 12, 2024. See https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core |
This does solve my problem for now. Thanks |
Mine too. Could you please add the note about that issue into Changes? |
Thank you. This solved my problem too. |
Type: Bug
Issue Description
I have encountered the error message below. Have attempted to uninstall and reinstall VSCode, reinstall extensions and so on, but error still persists.
=======================================================
Internal error in the debugger.
Exception = System.DllNotFoundException
Message = Unable to load shared library 'vsdbg' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:
dlopen(/Users/anson/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/vsdbg.dylib, 1): image not found
dlopen(vsdbg.dylib, 1): image not found
dlopen(/Users/anson/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/anson/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib (which was built for Mac OS X 12.0)
Expected in: /usr/lib/libc++.1.dylib
dlopen(libvsdbg.dylib, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/anson/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib (which was built for Mac OS X 12.0)
Expected in: /usr/lib/libc++.1.dylib
dlopen(/Users/anson/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/vsdbg, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/anson/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib (which was built for Mac OS X 12.0)
Expected in: /usr/lib/libc++.1.dylib
dlopen(vsdbg, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/anson/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg.dylib (which was built for Mac OS X 12.0)
Expected in: /usr/lib/libc++.1.dylib
dlopen(/Users/anson/.vscode/extensions/ms-dotnettools.csharp-2.34.12-darwin-x64/.debugger/x86_64/libvsdbg, 1): image not found
dlopen(libvsdbg, 1): image not found
Code = 80131524
at VsDbg.NativeEntryPoint.EnsureInitialized(String[] args)
at VsDbg.Transports.LocalTransport.b__28_0()
VS Code version: Code 1.90.2 (Universal) (5437499, 2024-06-18T22:37:41.291Z)
OS version: Darwin x64 20.6.0
Modes:
Steps to Reproduce
Expected Behavior
Actual Behavior
Logs
C# log
C# LSP Trace Logs
Environment information
VSCode version: 1.90.2
C# Extension: 2.34.12
Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 8.0.302 Commit: ef14e02af8 Workload version: 8.0.300-manifests.f6879a9a MSBuild version: 17.10.4+10fbfbf2eRuntime Environment:
OS Name: Mac OS X
OS Version: 11.7
OS Platform: Darwin
RID: osx-x64
Base Path: /usr/local/share/dotnet/sdk/8.0.302/
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.6
Architecture: x64
Commit: 3b8b000a0e
.NET SDKs installed:
3.1.426 [/usr/local/share/dotnet/sdk]
8.0.302 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
Extension version: 2.34.12
VS Code version: Code 1.90.2 (Universal) (5437499feb04f7a586f677b155b039bc2b3669eb, 2024-06-18T22:37:41.291Z)
OS version: Darwin x64 20.6.0
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: