unity – Issues with referencing experimental light class

I am trying to reference a Light2D component on a GameObject but I get the following error:

'The type or namespace name 'Universal' does not exist in the namespace 'UnityEngine.Experimental.Rendering'.

I have confirmed that I have v10.2.2 of the Universal RP package in package manager. I have also attempted regenerating all csproj files as well as deleting the Library folder and reopening Unity. I also have the library reference to ‘UnityEngine.Experimental.Rendering.Universal’ in my script.