-EDIT-
I fixed it by completely reinstalling Unity. I deleted every version of the editor and Unity Hub and every folder related to Unity. It works again now. Something got seriously screwed up before and I’m glad it’s fixed. I hope this helps somebody if they have the same issue!
I have had this issue since Unity 2021.1 and I just can’t seem to fix it. When I create a new HDRP project there are compiler errors such as Library\PackageCache\com.unity.shadergraph@12.1.1\Editor\Generation\Targets\BuiltIn\Editor\ShaderGUI\MaterialAssemblyReference\RawRenderQueue.cs(12,24): error CS1061: ‘Material’ does not contain a definition for ‘rawRenderQueue’ and no accessible extension method ‘rawRenderQueue’ accepting a first argument of type ‘Material’ could be found
AND
Library\PackageCache\com.unity.render-pipelines.high-definition@12.1.1\Runtime\Compositor\AlphaInjection.cs(59,30): error CS0115: ‘AlphaInjection.Cleanup()’: no suitable method found to override
There are 16 errors.
I have deleted the library folder, the packages folder, deleted and reinstalled the HDRP package and it just won’t work. I’m currently trying to use Unity 2021.2 and it stills has the same errors with HDRP version 12.1.1. Any help will be very appreciated!