Mac VSCode C# Dev Kit stopped compiling my code

179 views Asked by At

I've been working on my codebase for months just fine. Today VSCode just stopped compiling it. F12 can't find definitions for anything. I'm guessing one of my extensions updated.

The only hint I can find is under the OUTPUT tab, for C# Dev Kit:

Starting Spawn .NET server...
Starting Open a solution...
Starting Open a solution with environment service...
Starting Clear environment...
.NET server STDERR: Failed to load /Users/corey/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.13~x64/host/fxr/7.0.13/libhostfxr.dylib, error: dlopen(/Users/corey/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.13~x64/host/fxr/7.0.13/libhostfxr.dylib, 0x0001): tried: '/Users/corey/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.13~x64/host/fxr/7.0.13/libhostfxr.dylib' (code signature in <CBC551D2-1B48-36B4-BA7F-FC8A24B39EC7> '/Users/corey/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.13~x64/host/fxr/7.0.13/libhostfxr.dylib' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/System/Volumes/Preboot/Cryptexes/OS/Users/corey/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.13~x64/host/fxr/7.0.13/libhostfxr.dylib' (no such file), '/Users/corey/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.13~x64/host/fxr/7.0.13/libhostfxr.dylib' (code signature in <CBC551D2-1B48-36B4-BA7F-FC8A24B39EC7> '/Users/corey/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.13~x64/host/fxr/7.0.13/libhostfxr.dylib' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?))
The library libhostfxr.dylib was found, but loading it from /Users/corey/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.13~x64/host/fxr/7.0.13/libhostfxr.dylib failed
  - Installing .NET prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=2063366

.NET server exited with 130

I've tried restarting VSCode many times. I've reinstalled the dotnet sdk dotnet-sdk-7.0.403-osx-x64.pkg as the error message suggests. The file /Users/corey/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.13~x64/host/fxr/7.0.13/libhostfxr.dylib does exist. My processor is a 2 GHz Quad-Core Intel Core i5. I've tried Preferences > Settings > Omnisharp > Toggling on 'Dotnet>Server: Use Omnisharp' as suggested here, but that changed nothing.

The key part of the error message seems to be libhostfxr.dylib' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)) Did Microsoft not sign their library properly or something? Am I supposed to sign this somehow? Everything was working fine two days ago. I'm baffled and frustrated. Any help is appreciated.

0

There are 0 answers