Hello,
I’ve been working on an automated build for WebGL and have run into an issue. When building from Linux → WebGL, I get compilation errors because the assembly is missing its dependencies:
Assets/_Game/Code/Engine/ITelemetry.cs(18,19): error CS0234: The type or namespace name ‘Extensions’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)
In this case, the symbol is coming from Microsoft.Extensions.Logging.Abstractions.dll, which I have placed in Assets/External. Assets/_Game/Code/Engine/ITelemetry.cs is part of an assembly definition that has ‘Override References’ turned off (default), and the relevant external assemblies are marked ‘Auto Reference’ and ‘Any Platform’.
The same build script, when called from the editor on Windows, completes successfully.
The root cause seems to be that the generated .rsp files are missing dependencies when built on Linux. Specifically, there is a file Library\Bee\artifacts\000b0aE.dag{assembly}.rsp file that has these directives when built on Windows and is missing them when built from Linux.
This is the line that is missing in the .rsp file when built on Linux.
-r:“Assets/_Game/External/Microsoft.Extensions.Logging.Abstractions.dll”
If I build on windows and then mount the Library folder into Linux and repeat the build on Linux, I get a successful build. Presumably because some stuff is cached, but shows that the build will complete on Linux if it gets dependencies right.
These are the relevant commandline arguments:
/opt/unity/Editor/Unity -logfile /dev/stdout -batchmode -quit -nographics -projectPath . -executeMethod
UHE.BuildScript.CommandlineBuild
I am targeting .netstandard 2.1.
I can reproduce this on my local machine and a remote/clean CI machine.
This seems like a bug to me. I couldn’t find any similar issue in the issue tracker.
If anyone has an ideas for me to try to workaround, or point out something boneheaded I might have done, I would appreciate it. So far I’ve tried explicitly declaring the references and moving folder around in case it is a strange conflict with the old Plugins special folder but no avail.
Thanks much,
Ian