CI Build on Docker missing assembly references that work in local build


I’m having issues with setting up CI with Rewired. When I build locally, or on any other PC, the build goes through without any issues. However, when I’m building on CI docker VM, the build fails with missing assembly error, such as this one:

error CS0246: The type or namespace
name ‘Rewired’ could not be found (are
you missing a using directive or an
assembly reference?)

The project assemblies are set up in such a way that all of my Scripts are in their own Assembly, and the assembly has both Rewired.Core.dll and Rewired.Windows.dll as Assembly Reference. The DLL files also are set-up to be included in all builds. The full build log can be found here - build_win · GitHub

I have tried reinstalling the affected plugin (Rewired), or placing Rewired into it’s own Assembly, and referencing that Assembly. Everything works in a build on Windows, but not when building on the Ubuntu VM.

The build is performed using CircleCI on unityci/editor:ubuntu-2020.2.6f1-windows-mono-0.14.0 docker container. The script I use for starting the build is here: gist:84e97c228015000ec3b46d8bb53e8ff6 · GitHub

Anyone has any idea how to solve this? I’ve tried everything I can think of, and the build just does not want to use the Rewired.Core.dll that is referenced in the assembly, is set up to be included in builds for any platforms, and is working when building on windows.

This is my main assembly I use for every non-Editor code:

and this is the Rewired dll:

EDIT: The issue is happening even if I delete all of my assemblies from the project, so all of my code is in the default Assembly-CSHarp. Rewired does not have any assemblies by default, so the missing Rewired code definitely is in the same assembly as my code.

I have solved the issue in question. It has plagued us literally for years, random issues with Rewired assemblies missing here and there. The issue would pop up every now and then, seemingly at random.

The issue was caused by this line in .gitignore:


We should’ve figured that sooner. So, if you ever get seemingly random assembly import errors that pop out every now and then, make sure to check your .gitignore, if any libraries or some other important files from plugins are not missing from your repository.