Dependency not strong-named

Add-in Express™ Support Service
That's what is more important than anything else

Dependency not strong-named
 
Subscribe
Oscar Peters




Posts: 2
Joined: 2024-02-05
In a project I created with Add-in Express, I am trying to use Serilog.Sinks.PostgreSQL to log to Supabase. Add-in Express requires the assemblies to be strong named. However, when running the project, I get the following error:

Exception Source: KeyKombo.Common
Exception Type: System.IO.FileLoadException
Exception Message: Could not load file or assembly 'Serilog.Sinks.PostgreSQL, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

Please advise on how to resolve this error?
Posted 05 Feb, 2024 12:45:07 Top
Andrei Smolin


Add-in Express team


Posts: 18833
Joined: 2006-05-11
Hello Oscar,

That's .NET: it doesn't allow a strongly-typed assembly load a non-strongly-typed assembly.

You can make your add-in non-strongly-typed assembly:

- Unregister your project.
- Uncheck the Sign the assembly check box on {your project} | Properties | Signing tab.
- In the Loader\adxloader.dll.manifest, remove the ", PublicKeyToken={hex digits}" part from the name attribute of the assemblyIdentity tag.
- Rebuild the project, register it, make sure your setup project(s) delivers the updated version of adxloader.dll.manifest.

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Feb, 2024 13:08:36 Top
Oscar Peters




Posts: 2
Joined: 2024-02-05
Hi Andrei Smolin, Hi Andrei Smolin, Hi Andrei,

Thanks for the heads up. I only recently starting working with Add-in Express and was under the impression that the assemblies were required to be signed. I followed your steps and it works now. Thank you.

KR. Oscar
Posted 05 Feb, 2024 13:30:26 Top
Andrei Smolin


Add-in Express team


Posts: 18833
Joined: 2006-05-11
Welcome!

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Feb, 2024 14:35:56 Top
Andrei Smolin


Add-in Express team


Posts: 18833
Joined: 2006-05-11
Hello Oscar,

That's .NET: it doesn't allow a strongly-typed assembly load a non-strongly-typed assembly.

You can make your add-in non-strongly-typed assembly:

- Unregister your project.
- Uncheck the Sign the assembly check box on {your project} | Properties | Signing tab.
- In the Loader\adxloader.dll.manifest, remove the ", PublicKeyToken={hex digits}" part from the name attribute of the assemblyIdentity tag.
- Rebuild the project, register it, make sure your setup project(s) delivers the updated version of adxloader.dll.manifest.

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Feb, 2024 12:18:15 Top