Yesterday, we were on Unity 5.4.1p1 and we had successful build even though we had this:
[Unity] DllNotFoundException: user32.dll
Today, we’re on Unity 5.6.1p2 and have the same log but then it finished with this:
1665: [Unity] Player export failed. Reason: DllNotFoundException: user32.dll
1666: ! build of ‘default-windows-desktop-64-bit’ failed. compile failed
1667: publishing finished successfully.
1668: Finished: FAILURE
We are building for Windows desktop 64-bit and locally we are on building on Windows
How come we get the DllNotFoundException on Unity cloud but not not locally? What platform is Unity cloud running on?
How come the builds now fail because of this?
What is the solution to prevent this error? Should we include user32.dll in the project?
yes it’s working now because we commented the functionality that was using it since we needed the builds to pass successfully. To be clear, we don’t include user32.dll in the project.
On UCB, we are building for windows desktop 64-bit. (I’m changing this now to 32 bits for unrelated reasons)
Locally, I’m on windows 64 bit. The builds are working locally for both 32 and 64 bits.
In the code, we were using [DllImport("user32.dll")]
I did try to include user32.dll (taken from my C:\Windows\System32\ folder) in the project but that didn’t solve the issue. In any case, I don’t feel like including user32.dll in the project/build is a good idea.
So I guess that’s the source of the issue. Our windows build only works when built on Windows because of the need for user32.dll.
Any upcoming solution from UCB side? Is there something we can try to solve this on our side without needing to include user32.dll in the build (which didn’t work anyway)?