ShaderGraph Error "undeclared identifier BuildSurfaceDescriptionInputs / BuildVertexDescriptionInputs"

I have created a project in Unity 2020.3.33f1 from the Universal RP Sample on my Linux machine, I am using Git (with LFS and all the correct settings according to How to Git with Unity) and now I cloned the project on my Windows 10 machine. When I now open the project, some materials that I created with a custom ShaderGraph are pink, when I open the Shadergraph I am presented with the following error on some (not all) nodes:

Shader error in 'Master': undeclared identifier 'BuildVertexDescriptionInputs' at /Library/PackageCache/com.unity.render-pipelines.universal@10.8.1/Editor/ShaderGraph/Includes/Varyings.hlsl(15) (on d3d11)

and

Shader error in 'hidden/preview/FresnelEffect_2582522f28e24c3798bc9a783b58d96d': undeclared identifier 'BuildSurfaceDescriptionInputs' at /Library/PackageCache/com.unity.shadergraph@10.8.1/ShaderGraphLibrary/PreviewPass.hlsl(13) (on d3d11)

Fresnel Effect is one of the affected nodes, as well as everything that uses it’s output. Curiously, the generated code from the fresnel effect contains the following comment:

    //     $features.graphPixel:   $include("BuildSurfaceDescriptionInputs.template.hlsl")
    //                                       ^ ERROR: $include cannot find file : BuildSurfaceDescriptionInputs.template.hlsl. Looked into:
    // Packages/com.unity.shadergraph/Editor/Generation/Templates

List of things I have already tried:

  • Installing a different LTS version (no difference)
  • Restarting unity (no difference)
  • Making a new URP pipeline asset and assigning it in project settings
  • Creating a new URP sample project and copying in the shader (the shader works fine)
    Also, the PackageCache and Packages folder seem to be completely identical to a new URP project, while the ScriptAssemblies seem to differ.

I would gladly appreciate any help, as I am running out of possible fixes.
Thanks!

I was very surprised to find out, that moving my project to a different folder fixed the issue. I am not entirely sure, but I suspect that ShaderGraph cannot compile if the path to the project is too long, because I did have a rather long path, and now that it is shorter, the error does not appear anymore.

in case any one faces this problem again make sure that any folder name of your project path does not have space. always name folder like exampkeName or example_Name don’t name a folder with space like “example name”. apply this rule to every folder you create even with the project folder name, parent folders and any folder you would create in asset folder.
above thing have fixed many such issue of mine.