How to register .net dll using Inno Setup

5

I have a DLL written in C # and I can not register it using Inno Setup.

An example of how to run this process would be useful.

    
asked by anonymous 10.02.2014 / 11:16

2 answers

5

Use the following syntax in your Inno Setup script:

[Run]
Filename: "{dotnet20}\Regasm.exe"; Parameters: "{nome da dll} /codebase"; WorkingDir: "{app}"; Flags: runhidden; StatusMsg: "Registrando DLL"

Instead of the {dotnet20} code, you can change it to the version of the NET Framework in question, for example: {dotnet30}, {dotnet40}, {dotnet4.5}.

The "WorkingDir" parameter refers to the location where the dll is located.

Obviously the .NET Framework will need to be installed. Then this command should be executed only after it has been installed.

    
11.02.2014 / 01:07
2

A .net assembly (.dll) needs to be registered differently than other .dll's. Inno Setup will not know this when you mark .dll as regserver .

In this case, try to put at the end of your script (after unpacking the installation):

[Run]
Filename: "c:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"; Parameters: "/codebase [CaminhoParaSuaDllAqui]"

(Based on this English OS response)

    
10.02.2014 / 11:43