Showing results for 
Search instead for 
Do you mean 
Reply

Signing C# dll. System.DllNotFoundException: Couldn’t load DLL “libuginit”.

Hi!

I’ve developed my dll thorough C# and I would like to sign my dll file. I used to sign my C++ library, however I couldn’t find a guide about how to sign a C# library. So I started to sign C# library like I signed C++ library. Please, correct me, if I do incorrectJ.

 What I do:
1. Copy in a folder files such as

  • my dll library,
  • exe
  • Utilities(I also copied this file. Otherwise I got an exception: System.DllNotFoundException: Couldn’t load DLL NXOpen.Utilities)
  1. Write in a command line of FAR:

D:\Libraries\SignDotNet.exe pneumoCylinder.dll

And I see the error:

Checking for the presence of DotNet Author License

System.DllNotFoundException: Couldn’t load DLL “libuginit”: A required module is not found(Exception from result: 0x8007007E)

       in SignLibrary.JAM_SESSION_presence_check_dotnet_author_license()

       in SignLibrary.main(String[] args)

I do not why I’ve got such an exception cause I’ve copied an “libuginit.dll” from UGS_NX9\UGII to D:\Libraries\.
Guys, how to solve this exception?  Any help would be greatly appreciated. I cannot find a guide about signing (NX Open Programmer’s Guide->License Checking)

4 REPLIES

Re: Signing C# dll. System.DllNotFoundException: Couldn’t load DLL “libuginit”.

The process is not that difficult and is clearly documented in the NX Open Programmers Guide:

 

 

Just make sure you are executing SignDotNet.exe in a NX Command Prompt (i.e. an environment that has the NX env variables, particularly %UGII_BASE_DIR% and %UGII_ROOT_DIR% defined correctly.

 

If NXSsigningResource.res is embedded properly and if the envronment is defined correctly, SignDotNet.exe should be able to find everything it needs. No additional files need to be copied.

Re: Signing C# dll. System.DllNotFoundException: Couldn’t load DLL “libuginit”.

Make sure to run the command script inside of a NX command prompt or add %UGII_ROOT_DIR% to the PATH variable.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Signing C# dll. System.DllNotFoundException: Couldn’t load DLL “libuginit”.

Hi,

 

These file are my script files *.bat for sign and verify the dll. Simply drag and drop the dll to *.bat

 

With a little effort could you modify the registry to sign with RMB like this:

 

 

Best Regards,

 

Re: Signing C# dll. System.DllNotFoundException: Couldn’t load DLL “libuginit”.

I use the post action in Visual Studio.

After signing I also copy the dll to the target dir and there I can test it.

See attached image.

 

Mit freundlichen Grüßen / With kind regards

i.A. Dipl.-Ing. (FH) Stefan Walder
CAD Management
----------------------------------------------------------------------
stefan.walder@gira.de
Tel +49(0)2195-602-319, Fax +49(0)2195-91603-319
----------------------------------------------------------------------
Gira Giersiepen GmbH & Co. KG, Elektro-Installations-Systeme
Industriegebiet Mermbach, Dahlienstraße, 42477 Radevormwald, Deutschland

Intelligente Gebäudetechnik von Gira. www.gira.de

Handelsregister AG Köln HRA 16352
Persönlich haftende Gesellschafterin: GAV Management GmbH,
Handelsregister AG Köln HRB 50479
Geschäftsführer: Dipl.-Kfm. Dirk Giersiepen, Alfred A. Bulitz,
Dipl.-Kfm. Thomas Musial
----------------------------------------------------------------------
Gira Giersiepen GmbH & Co. KG, Electrical installation systems
Industriegebiet Mermbach, Dahlienstraße, 42477 Radevormwald, Germany

Intelligent building technology by Gira. www.gira.com

Register of Business Names: AG Köln HRA 16352
Partner Personally Responsible: GAV Management GmbH,
Register of Business Names: AG Köln HRB 50479
Managing Directors: Dipl.-Kfm. Dirk Giersiepen,
Dipl.-Wirtschafts-Ing. (FH) Oliver Borchmann, Alfred A. Bulitz,
Dipl.-Kfm. Thomas Musial