-
Notifications
You must be signed in to change notification settings - Fork 676
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
Rosyln failing to start on Mac x64 with 'image not found' error for hostfxr.dylib #6198
Comments
@jasonmalinowski since you have an x64 mac, mind taking the first look? The extension platform and os platform and dotnet platform seem to match. |
Seems related to microsoft/MSBuildLocator#230 |
That does indeed look incredibly related. Thanks for the link! |
The issue was addressed in the scope of dotnet/msbuild#9038 You can use the package with the fix https://www.nuget.org/packages/Microsoft.Build.Locator/1.6.1. |
Environment data
dotnet --info
output:VS Code version: 1.81.1
C# Extension version: v2.0.376
Omnisharp log
C# log
Version:1.0 StartHTML:000000096 EndHTML:000005287 StartFragment:000000186 EndFragment:000005273Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime
Found dotnet version 6.0.22. Minimum required version is 7.0.100.
Dotnet path: /Users/vs/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.10/dotnet
Activating C# standalone...
[Info - 4:26:50 PM] [Program]Language server initialized
[Error - 4:26:51 PM] [LanguageServerHost]System.DllNotFoundException: Unable to load shared library 'hostfxr' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:
dlopen(/Users/vs/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.10/shared/Microsoft.NETCore.App/7.0.10/hostfxr.dylib, 1): image not found
dlopen(/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.0.376-darwin-x64/.roslyn/hostfxr.dylib, 1): image not found
dlopen(hostfxr.dylib, 1): image not found
dlopen(/Users/vs/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.10/shared/Microsoft.NETCore.App/7.0.10/libhostfxr.dylib, 1): image not found
dlopen(/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.0.376-darwin-x64/.roslyn/libhostfxr.dylib, 1): image not found
dlopen(libhostfxr.dylib, 1): image not found
dlopen(/Users/vs/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.10/shared/Microsoft.NETCore.App/7.0.10/hostfxr, 1): image not found
dlopen(/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.0.376-darwin-x64/.roslyn/hostfxr, 1): image not found
dlopen(hostfxr, 1): image not found
dlopen(/Users/vs/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.10/shared/Microsoft.NETCore.App/7.0.10/libhostfxr, 1): image not found
dlopen(/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.0.376-darwin-x64/.roslyn/libhostfxr, 1): image not found
dlopen(libhostfxr, 1): image not found
at Microsoft.Build.Locator.NativeMethods.hostfxr_resolve_sdk2(String exe_dir, String working_dir, hostfxr_resolve_sdk2_flags_t flags, hostfxr_resolve_sdk2_result_fn result)
at Microsoft.Build.Locator.DotNetSdkLocationHelper.GetDotNetBasePaths(String workingDirectory)+MoveNext()
at Microsoft.Build.Locator.DotNetSdkLocationHelper.GetInstances(String workingDirectory)+MoveNext()
at Microsoft.Build.Locator.MSBuildLocator.GetInstances(VisualStudioInstanceQueryOptions options)+MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at Microsoft.CodeAnalysis.LanguageServer.HostWorkspace.LanguageServerProjectSystem.TryEnsureMSBuildLoadedAsync(String workingDirectory) in /_/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectSystem.cs:line 140
at Microsoft.CodeAnalysis.LanguageServer.HostWorkspace.LanguageServerProjectSystem.OpenProjectsAsync(ImmutableArray`1 projectFilePaths) in /_/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectSystem.cs:line 112
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136
Steps to reproduce
Note
Actual behavior
An error pop up after F5 to run the project:
The text was updated successfully, but these errors were encountered: