How to register a .NET DLL using Inno Setup

前端 未结 2 2041
野的像风
野的像风 2021-02-20 17:50

I have written a class library using Visual Studio 2010 C# to read hardware information of a Computer (e.g. HDD/SSD). I will use this dll to create an installer using InnoSetup

2条回答
  •  离开以前
    2021-02-20 17:55

    Though its more than a year, I recently had the same problem and was able to rectify using the below script.

    [Run]
    Filename: "{dotnet20}\RegAsm.exe"; Parameters: /codebase YourDLL.dll; WorkingDir: {app}; StatusMsg: "Registering Controls..."; Flags: runminimized
    

    If the file has be registered at initialize step, we can use one of the Inno setup's support functions.

    function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;

    More Info can be found in: Inno Setup Help

提交回复
热议问题