Window 64-bit build fails - Can't find Unity libraries

Description of issue:
My win 64 build fails on Cloud Build stating that it can’t find any of the Unity libraries. I’m using the .NET 4.6 scripting runtime.

Unity version: 2017.2.0f3

Source control: Git w/ LFS with Visual Studio Team Services.

Local build platform: Windows 64-bit

Build target: Windows 64-bit

Relevant plugins being used (i.e. Google Play Game Services, other plugins that may perform automatic post-build behaviors)
None.

Project name: Tavern

Build log (relevant chunk):

Error: System.Exception: 'UnityEngine.MonoBehaviour' was not found in any of the referenced assemblies
28094: [Unity]   at us.UnityScriptCompilerFactoryModule.resolveType (System.Object assemblies, System.String typeName) [0x00089] in <c640d65315cc44779b32219854912c61>:0
28095: [Unity]   at us.UnityScriptCompilerFactory.FromCommandLineOptions (us.CommandLineOptions options) [0x002a8] in <c640d65315cc44779b32219854912c61>:0
28096: [Unity]   at us.UsModule.compile (us.CommandLineOptions options) [0x00000] in <c640d65315cc44779b32219854912c61>:0
28097: [Unity]   at us.UsModule.runWithCommandLine (System.String[] commandLine) [0x0001d] in <c640d65315cc44779b32219854912c61>:0
28098: [Unity]   at us.UsModule.Main (System.String[] argv) [0x00000] in <c640d65315cc44779b32219854912c61>:0
28099: [Unity] (Filename:  Line: 0)
28100: [Unity] Error building Player because scripts had compiler errors
16618: [Unity] -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-CSharp.dll
16619: [Unity] Compilation failed: 3821 error(s), 2 warnings
16620: [Unity] Assets/3rdParty/Cinemachine/Base/Runtime/Behaviours/CinemachineBrain.cs(5,19): error CS0234: The type or namespace name `Events' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?
16621: [Unity] Assets/3rdParty/Cinemachine/Base/Runtime/Behaviours/CinemachineCollider.cs(4,19): error CS0234: The type or namespace name `Serialization' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?

Does it build locally from a fresh checkout?
Yes. Local build from a fresh git clone is ok with no errors.

I do get the error below in the editor, starting with 2017.2.0f3 however, but I can build successfully. I have yet to find out why.

scriptParameterClass != NULL
1 Like

This is being investigated. Seems all builds targeting windows / .NET 4.6 in 2017.2.0+ in UCB are running into this currently. Will report back when I have more info.

Aha. I expected it might have something to do with .NET 4.6. Thanks for the info.

1 Like

@dannyd It’s not production critical or anything for me, but any progress? Maybe you should give some kind of warning in the error log when building for Windows and .NET 4.6, or a service status for Cloud Build? There are probably more people wondering why their builds are failing.

Not to nag or anything, but my .NET 4.6 windows builds have been failing for 14 days or so now.

It would be useful if I could give out download links for testing, without downgrading my .NET version.

1 Like

We have the same problem here ! All Windows builds are just failing on UCB while they locally do fine !
Please advise :slight_smile:

I understand it’s frustrating waiting - sorry to say I don’t have an update here yet. This is something we are still actively working on tracking down and getting fixed in the Unity Cloud Build environment.

And to address your concern specifically @Corvwyn_1 , you can actually upload local builds into your Cloud Build history if you just need to give out download links (there is an “Upload” button at the top of the history page). I realize that isn’t ideal, but it’s an option for now.

1 Like

Thanks for the update. Best of luck with the solution.

1 Like

Just chipping in that I am also awaiting a a resolution to this issue

We are experiencing the same issue. Looking forward to status updates.

+1 from me as well for a fix please - as we use .net 4 not older .net for our project, cloud build has never successfully built for me. If there is a workaround in terms of a way we can make the project build that would be useful while we are waiting for a fix - thanks!

@dannyd are you tracking this bug already in the Unity Issue Tracker?

Any updates so far @dannyd , or are there any other channels where we might get informed about beta versions or patch releases to test?

I have the same issue … and same question than haraldreingruber, a way to follow evolution ?

We are working on a fix on the UCB side as opposed to needing a new patch release of Unity itself (as far as we can tell this generally only affects our build environment). Hoping to have a fix out in the next few days. Will post back here with updates.

2 Likes

Thanks for the update!

Sorry for slow followup - had a lot of the team out of the office over the holidays. This should be fixed now on our side. Please let me know if you continue to run into this issue.

1 Like

Many thanks for the update @dannyd definitely looking better.

It is still failing with:
[Unity] ArgumentException: The Assembly System.Runtime is referenced by System.Threading…Tasks.Extensions (‘Assets/System.Threading.Tasks.Extensions.dll’). But the dll is not allowed to be included or could not be found.

I think this is because System.Threading.Tasks.Extensions is referenced by NSubstitute, and that in turn needs System.Runtime. Is there a different supported Nsubstitute which we need to use for unity, or is that just not supported now in unity with .net 4.5?

I suspect other than that it will build now though, so thanks very much for sorting that :slight_smile:

Thanks for the fix and info. My game builds successfully now.

I’m using .net3.5 and unity 2018.1.0f2 and still having this problem