I am new to VS Code and Unity and am having some problems. When i type code like so the intelliSense for Unity doesn't show up. I know this topic has been discussed many times, but I'm currently but i tried a lot of things and nothing seems to work. The last error that i can find is this one: "Unhandled exception. System.BadImageFormatException: Tentative de chargement d'un programme de format incorrect. (0x8007000B)" and i'm not competent enough to resolve this by myself and more importantly i'm not sure if it's related.
CodePudding user response:
You need .NET framework 4.7.1 Developer Pack. Try this
- Uninstall all extension on VSCode.
- Close VSCode and Unity.
- Install .NET framework 4.7.1 Developer Pack.
- Open Unity and set VSCode as the code editor.
- Open VSCode from Unity.
- Install the Omnisharp extension.
Source: https://vionixstudio.com/2021/11/02/unity-visual-studio-code/
CodePudding user response:
For Visual Studio it sometimes helps to regenerate the project files:
In Unity:
Edit -> Preferences -> External Tools -> "Regenerate project files"
Maybe it also works for VS Code. Make also sure "Visual Studio Code" is selected as "External Script Editor" before regenerating.