vscode-csharp: Error: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found
Environment data
dotnet --info
output: 2.2.1
VS Code version:
C# Extension version: 1.17.1
Steps to reproduce
Try to use the Unity Debugger. Error gets thrown in VSCode
Expected behavior
No errors
Actual behavior
Errors on startup
The .NETFramework is not available on a Mac. I’m not sure if it is needed for this extension - if it is, the extension is useless on Mac. If it is not, there should be a check for the platform or something. Regardless, if I try to debug Unity, it crashes as soon as I hit play (Debug adapter process has terminated unexpectedly (spawn mono ENOENT)
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 16 (1 by maintainers)
Try adding
export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current
to your~/.bash_profile
or~/.zshrc
or whichever terminal you use. Restart VSCode before trying again.That worked for me too! Thank you very much!
Same issue =\
https://github.com/OmniSharp/omnisharp-vscode/issues/3063#issuecomment-642598877
@heaversm You need to install mono (https://www.mono-project.com/download/stable/#download-mac). I recommend installing version 5.18 from that page instead of using homebrew/etc package managers. (copied from https://github.com/OmniSharp/omnisharp-vscode/issues/2555#issuecomment-456998688)