Can't declare NetworkVariable

Hey all! I’m trying to declare a network variable for the current number of players, but whenever I declare the variable as an int I get the following: Any ideas?

That is odd. Which Netcode and Unity version?
Does it work with bool and float?

Unity 2021.3.2f1, Netcode for GameObjects 1.0.2

It doesn’t work for any value type I’ve used.

private NetworkVariable<int> value = new NetworkVariable<int>(0);
Thils line works for me. Are you using Unity.Netcode;
using System.Collections;
using System.Collections.Generic;?
And did you connect visual studio to unity?

Minimal working version. Does this work if you add it to your project in a new script file named NetVar.cs?

using Unity.Netcode;
public class NetVar : NetworkBehaviour
{
    private NetworkVariable<int> variable = new(1);
}

Does it work in the editor, or is only the IDE complaining?

Yes across the board

No, this new file also doesn’t work, and it throws the same error whenver I try to run.
It’s also saying ‘’ is a type not supported by the language, whihc means nothing to me

8525513--1137407--upload_2022-10-19_16-43-51.png

Could you create a new project, add Netcode to it, and see if that works?
Do you get the same error in the Unity Editor Console window?

The situation appears to have resolved itself with the 1.1.0 update this morning. Thanks all!