- Home /
Unity Cloud Build error with .dll
I have multiple projects I want to add to Unity Cloud Build. When I setup a "normal" project without a managed .dll-file, everything builds fine. But in most of our product we have a managed .Dll with monobehaviour classes which we can't work without. When Unity Cloud Build builds these projects, we get build errors saying that it can't find the classes and methods inside the .dll-file.
Note: with a manual Unity Build everything works fine.
[Unity] Initialize engine version: 5.2.0f3 (e7947df39b5c)
[Unity] -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-CSharp.dll
[Unity] Compilation failed: 1 error(s), 0 warnings
[Unity] Assets/Scripts/TempScript.cs(9,9): error CS0103: The name `Kinemoto' does not exist in the current context
[Unity] Assets/Scripts/TempScript.cs(9,9): error CS0103: The name `Kinemoto' does not exist in the current context
[Unity] -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-CSharp.dll
[Unity] Compilation failed: 3 error(s), 0 warnings
[Unity] Assets/KinemotoSDK/Example/Scripts/CoordinateMapperExample.cs(3,7): error CS0246: The type or namespace name `KinemotoSDK' could not be found. Are you missing a using directive or an assembly reference?
[Unity] Assets/KinemotoSDK/Example/Scripts/CoordinateMapperExample.cs(4,7): error CS0246: The type or namespace name `KinemotoSDK' could not be found. Are you missing a using directive or an assembly reference?
[Unity] Assets/KinemotoSDK/Example/Scripts/EngagementInfo.cs(1,7): error CS0246: The type or namespace name `KinemotoSDK' could not be found. Are you missing a using directive or an assembly reference?
[Unity] Assets/KinemotoSDK/Example/Scripts/CoordinateMapperExample.cs(3,7): error CS0246: The type or namespace name `KinemotoSDK' could not be found. Are you missing a using directive or an assembly reference?
[Unity] Assets/KinemotoSDK/Example/Scripts/CoordinateMapperExample.cs(4,7): error CS0246: The type or namespace name `KinemotoSDK' could not be found. Are you missing a using directive or an assembly reference?
[Unity] Assets/KinemotoSDK/Example/Scripts/EngagementInfo.cs(1,7): error CS0246: The type or namespace name `KinemotoSDK' could not be found. Are you missing a using directive or an assembly reference?
[Unity] Scripts have compiler errors.
[Unity] Scripts have compiler errors.
Is this a known problem and will it be resolved soon? Or will cloud build never support this?
Thanks in advance!
~Mark
Thanks for your replies. I'm using SVN (with tortoiseSVN) ins$$anonymous$$d of Git so unfortunately these solutions don't work for me.
Here's the manual page for TortoiseSVN's ignore files: http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-ignore.html
Answer by TonyLi · Sep 30, 2015 at 08:25 PM
Is your gitignore file excluding DLLs when uploading to Cloud? Check .gitignore in the project as well as your global gitignore.
Windows: [user]/.gitignore_global
Mac: ~/.gitignore_global
If you're using Subversion, check your ignore files and the global ignore list. $$anonymous$$ake sure SVN isn't ignoring DLLs.
Answer by Lisurc · Oct 15, 2015 at 01:09 AM
Adding some input here, the advice from @TonyLi was excellent.
I was having the same kind of problems with the Cloud Build although I was quite sure I had added the whole asset directory to the repository. Turns out I'm not used to GIT (using SVN most of the time) and was not aware of the global git ignore file. And there was indeed a bunch of excluded file extensions, including *.dll.
Just for information, on Windows and with my configuration (using TortoiseGit, if that matters), the actual ignore file was at %userprofile%\documents\gitignore_global.txt
@TonyLi, In SVN everything is set just fine. Before Unity Cloud build, I have been using my custom self configured build server (Windows 2008 Server with Unity, Repo Server and Bamboo) for building of my Unity projects.
I just wanted to give Unity Cloud build a try, but until that won't seem to work for me I'll keep using my own Unity Build Server.
Any other ideas regarding the Cloud Build service part?
Thanks!
The issue is still almost certainly the same -- that .DLLs are being excluded from the repository. If you can address this, Unity Cloud Build should work. If you've confirmed that Cloud has access to the DLLs but it's still not working, submit a bug report.
Answer by OnatKorucu · Feb 15 at 11:21 PM
In my case, I generated .gitignore via gitignore.io and I typed "VisualStudio" and "Csharp" along with "Unity" to generate. However, in the generated file .meta files were being ignored. Not ignoring meta files in Assets folder as I answered in stackoverflow let me push .meta files into cloud and solved the issue.
The easiest way to test these kind of things is is pulling your project from cloud into another empty folder in your device and see if it builds or if it has all the files you need.
Your answer
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Any CPU DLL does not work in 64 bit editor 0 Answers
How do I use a C# dll library from a script? 2 Answers
Import (mixed assembly) managed C++/CLI DLL plugin 0 Answers
Can't load type from DLL. 1 Answer