Shader Graph and possible namespace conflict

Hi,
I have been upgrading a few projects to use the later versions and also seeing if I can switch to using .Net Standard for a library I am exploring. The library needs AMQP to talk to an Azure event hub and it works fine as .Net Framework 4.5 library in Unity 2020.1.4f1 which has URP and Shader Graph 8.2.0.
If I upgrade to 2021.1.23f1 I get URP and Shader Graph 11.0.0. If I load my custom library and its dependants into this new version I get

Library\PackageCache\com.unity.render-pipelines.universal@11.0.0\Editor\ShaderGraph\Targets\UniversalTarget.cs(523,44): error CS0234: The type or namespace name 'GLES' does not exist in the namespace 'Platform' (are you missing an assembly reference?)
I know I am not missing an assembly, but I think I have tracked it down to the use of Microsoft.Azure.amqp
I think the problem is down to the fact that this amqp library defines a namespace that begins “Platform.” and this is the namespace that the shader graph editor finds when trying to resolve the Platform.GLES3 (for example) in the UniversalTarget.cs code file. I think this mechanism is new for version 10 onwards …
Any ideas or thoughts on how to get rounds this… I have tried everything I can think of…

Thanks

Hi Parathon, did you ever solve this? I’m running into the exact same issue one year later. I looked into the Microsoft.Azure.Amqp code and the issue was fixed 4 years ago but the code still hasn’t made its way to NuGet. You can see Don't introduce root namespace "Platform" · Issue #141 · Azure/azure-amqp · GitHub for reference. Did you find a workaround in the meantime?

Adding the exact error messages here in case other people search for this issue in the future:

Library\PackageCache\com.unity.render-pipelines.universal@12.1.7\Editor\ShaderGraph\Targets\UniversalTarget.cs(1293,44): error CS0234: The type or namespace name ‘GLES’ does not exist in the namespace ‘Platform’ (are you missing an assembly reference?)

Library\PackageCache\com.unity.render-pipelines.universal@12.1.7\Editor\ShaderGraph\Targets\UniversalTarget.cs(1293,59): error CS0234: The type or namespace name ‘GLES3’ does not exist in the namespace ‘Platform’ (are you missing an assembly reference?)

Library\PackageCache\com.unity.render-pipelines.universal@12.1.7\Editor\ShaderGraph\Targets\UniversalTarget.cs(1293,75): error CS0234: The type or namespace name ‘GLCore’ does not exist in the namespace ‘Platform’ (are you missing an assembly reference?)

Library\PackageCache\com.unity.render-pipelines.universal@12.1.7\Editor\ShaderGraph\Targets\UniversalTarget.cs(1293,92): error CS0234: The type or namespace name ‘D3D11’ does not exist in the namespace ‘Platform’ (are you missing an assembly reference?)

I had the same problem :frowning:

As a workaround. you can build it yourself, replace it in the package directory and allow unsafe code in your project: GitHub - Azure/azure-amqp: AMQP C# library