I am trying to set up a C# project with VSCode through Unity. I installed the .NET Devkit and C# extention for VSCode, and set the "External Script Editor" to VSCode in Unity Preferences. However, every time I try to use Intellisense, nothing appears. The console output at the bottom reads as follows:
2023-06-22 12:55:53.164 [warning] The project file 'c:Users<user>DocumentsUnity Projects<project name>Assembly-CSharp.csproj' is in unsupported format (for example, a traditional .Net Framework project). It need be converted to new SDK style to work in C# Dev Kit.
2023-06-22 12:55:53.267 [error] Failed to load project 'c:Users<user>DocumentsUnity Projects<project name>Assembly-CSharp.csproj'. One or more errors occurred. (This project is not supported in C# Dev Kit.)
2023-06-22 12:55:53.273 [info] Project system initialization finished. 0 project(s) are loaded, and 1 failed to load.
How do I convert the .csproj
to a "traditional .NET Framework project" and still have it work with Unity?
I am on Windows 10.
I have:
- Uninstalled and Reinstalled VSCode
- Updated the "Visual Studio Code" Extension in Unity
- Installed the .NET Devkit
- Checked that VSCode is selected in Unity as the external script editor
- Turned off Omnisharp Modern NET usage
(in no particular order)
2
Answers
FIGURED IT OUT, I had a more recent version of the .NET Devkit than the one Unity used. I uninstalled version 4.8.1 and installed 4.7.1 instead, and it worked.
I use 4.7.1 as well, but I still have Exactly the same issue.
May I ask you which .Net(core) version you use?
My Versions:
.Net version: 7.0
.Net Developer pack: 4.7.1
I also did all the other thing listed in your question.