- Home /
CI Build on Docker missing assembly references that work in local build
Hello,
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:
Assets/Scripts/StorySpecific/7/MergedRobotInputHandler.cs(18,12): 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 - https://gist.github.com/TheMikina/ff0a7fb16bff1acdf2d80d3e04ac40af
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: https://gist.github.com/TheMikina/84e97c228015000ec3b46d8bb53e8ff6
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.
Answer by Mikina · Sep 01, 2021 at 02:36 PM
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:
/Assets/Plugins/Rewired/Internal/Libraries
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.
Your answer
Follow this Question
Related Questions
Unity Editor Error CS0234: Build doesn't exist in the namespae "UnityEditor" 5 Answers
How to generate Assembly-UnityScript-firstpass.csproj ? 1 Answer
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
DIY Cave Environment Are you missing a using directive or an assembly reference? 1 Answer
How can I stop the variable values reverting to its default values after being built? 1 Answer