1

I'm using Unity 2021.3.28f version. An error appears when I open VSCode from Unity, and the project can't load, resulting in autofill not working. How can I fix this?

`*[warning] The project file 'c:\Users\User\Unity\My project\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.*
*[error] Failed to load project 'c:\Users\User\Unity\My project\Assembly-CSharp.csproj'. One or more errors occurred. (This project is not supported in C# Dev Kit.)*`

I have intaill C#, C# dev kit, Unity Code Snippets, .NET Extension Pack

Checked that VSCode is selected in Unity as the external script editor

Turned off Omnisharp Modern NET usage

Someone has similar problem, But after trying it I still have the same issue. Unity Intellisense with VSCode not suggesting/autofilling

I'm on window 11

I download .NET framework 4.7.1 developer pack and .NET SDK 6.0

2 Answers2

3

Solve it ;) I simply removed ALL my Visual Studio Code extensions in the directory C:\Users\User.vscode\extensions and re-installed the C# extension. It worked.

Update:

After installing the "IntelliCode for C# Dev Kit" extension, which automatically installed another .NET extension, I encountered the same problem. It seems like this combination of extensions may be causing the issue. That .NET extension can't be uninstalled normally so I clear my extension again.

  • Thanks! I had to remove the whole C# Dev Kit extension, which meant I had to remove the Unity extension by MS. But after that I didn't have to remove any other extensions. I just reloaded the window with CTL + SHIFT + P "Developer: Reload Window" and it worked. – fenix.shadow Aug 19 '23 at 21:40
0

Removing the Visual Studio Code Editor package and updating Visual Studio Editor in Unity Package Manager

Sealem
  • 1