Build Assembly-UnityScript.dll as Release version in Unity

To solve the assembly-unityscript.dll debug version issue in Unity 5.6.1f1 (you may find this cannot be changed from Unity UI Settings), please follow below steps:

1. The Assembly-UnityScript.dll is generated when using .JS as scripts, if the project doesn’t need, remove the .JS files should avoid generating Assembly-UnityScript.dll.

2. If the .JS scripts are required in the App, can refer to below steps to get a release version of Assembly-UnityScript.dll:

a. In Unity project,open temp folder,can see some file names starting with unitytemp-。Open some latest files one by one, you will see some file has below content, fo example, in this sample, I saw below strings in Temp/UnityTempFile-23f957311d4e8c441a046557e457d203:

-debug

-target:library

-i:UnityEngine

-i:System.Collections

-base:UnityEngine.MonoBehaviour

…………

-out:Temp/Assembly-UnityScript.dll

1. Remove the  -debug line and save it.

2. Open CMD, go to the project folder, run below command:

“D:\Program Files\Unity\Editor\Data\Mono\bin\mono.exe” “D:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\us.exe”  @Temp/UnityTempFile-23f957311d4e8c441a046557e457d203

It will generate /Assembly-UnityScript.dll with release version:

Successfully compiled ‘1’ file(s) to ‘D:\Projects\Hololens\DesktopObj\Temp\Assembly-UnityScript.dll’.

Then you can use it to replace the debug version.

Thanks,

Freist

(39)

Leave a Reply

Your email address will not be published. Required fields are marked *