ahmedshpt
ahmedshpt

Reputation: 23

ClosedXML - Could not load file or assembly exception

I am trying to use ClosedXML to produce excel documents within an application, however, Whenevet I try to run it I receive a could not load file or assembly server error.

This is my form application my form

This is my Package my Package

and this is my error when I click the import file button

error

Upvotes: 1

Views: 4211

Answers (1)

rickvdbosch
rickvdbosch

Reputation: 15621

Since you're developing for SharePoint, all used assemblies need to be strongly-named. They are deployed in the GAC, which is only possible for signed assemblies.

More info in this post: https://sharepoint.stackexchange.com/questions/62242/gac-and-signing-assembly-with-strong-name

You can change the NuGet reference to be ClosedXml.Signed, the signed version of ClosedXml.

Upvotes: 1

Related Questions