cancel
Showing results for 
Search instead for 
Did you mean: 

Register DLL to use in Unity Script

Ari_Alves_Ribei
Champ in-the-making
Champ in-the-making

I'm developing some integrations using text files stored in OnBase and an external library (. DLL) tied for Unity Scripts.

When I try to include the reference of this DLL in the list of project references, this DLL does not appear.

I have already disabled in the dialog box, the options:

-> Show only system DLL and
-> Show only. NET DLL 4

In my case, the DLL is developed in frameworkd v2.0.50727.

Presented on the screen, there is a message "These are part DLL. .... NET Framework and need to be installed in the GAC .."

I tried using the command Gacutil.exe (gacutil / i Lucene.Net.dll / f) to install this DLL, but I get the message

Failure adding assembly to the cache: Attempt to install an assembly without the
trong name.

Does anyone have any idea how to solve this?

2 REPLIES 2

Ari_Alves_Ribei
Champ in-the-making
Champ in-the-making

Hello Guys

I found the solution on the Internet

Solution of the assigning the strong name to the third part DLL by using following command on visual studio command prompt.

E.g. Lets say the name of the third party DLL is myTest.dll.
Step 1: Dis-assemble the assembly
        ildasm myTest.dll /out:myTest.il


Step 2: Re-Assemble using your strong-name key
        ilasm myTest.il /res:myTest.res /dll /key:myTest.snk /out:myTestSN.dll

Step 3: Use gacutil.exe to register on GAC Windows

        gacutil /i myTest.dll /f


This code work perfectly to assign strong name and it is possible to use on Unity Script API

for verification you can use following command,
sn -vf myTestSN.dll


Guys

FYI, you need visual studio installed on the PC to get the gacutil utily. It also included with the .net 2.0 sdk of .NET (downloadable for free).