Could not load file or assembly 'Docentric.OpenXml

0
aqqe posted this 04 February 2022

Hi,

I have download docentric to evalute for a customer. However when I try to start the site after adding the DocentricToolkitEngine nuget package the startup process throws the following error: : Could not load file or assembly 'Docentric.OpenXml, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c2a1f9cfb4f15acd'

Is there an issue with the nuget package?

The site runs on .net 6

Regards, Rob

Last edited 04 February 2022

1 Posts
1 Points
5 Comments
Order By: Standard | Newest | Votes
0
jles posted this 15 September 2022

Lukacs,

I'm sorry, but it seems like this is the only way to use the engine in your F# project. As I said, this limitation will be removed in v7.0.

Regards Jure

154 Posts
294 Points
0
lukacs.akos posted this 15 September 2022

Hi Jure,

Thanks for the response. Already tried the C# project -> F# project route, but referencing the C# project that has a reference to Docentric Toolkit, but that fails the build too. Looks like the only way is to have this as a separate C# only project and call that via a HTTP :(

10 Posts
10 Points
0
jles posted this 15 September 2022

Hi Lukacs,

I see. We don't have experience with F# projects. My first guess would be that it doesn't make any difference. But it seems that there is a difference. The problem obviously is in loading an embedded assembly. Docentric Toolkit package contains a single assembly that has an embedded assembly Docentric.OpenXml that for some reason cannot be loaded at runtime. There is nothing we can do since this is how we currently build the engine assembly. This is going to be changed in v7.0 where we will get rid of embedded assemblies. You could perhaps try to wrap this functionality in a C# project and then call it from your F# project. If this doesn't work, you will need to wrap the functionality in a web service.

Best regards, Jure

154 Posts
294 Points
0
lukacs.akos posted this 13 September 2022

I think I may have hit this issue, or something similar with an F# project. So have been testing the features in C# projects, but our main codebase is in F#.

Steps to reproduce:

dotnet new console -o testing --language f#
cd testing
dotnet run

You should see Hello from F# at this point.

dotnet add package DocentricToolkitEngine
dotnet run

But sadly blows up at this point with this exception:

FSC : error FS1108: The type 'OpenXmlElement' is required here and is unavailable. You must add a reference to assembly 'Docentric.OpenXml, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c2a1f9cfb4f15acd'.

Using .NET 6 and latest version (6.1.32) of the toolkit engine. Tried older versions of the nuget package, but same behavior: works in C# project, but the build fails in F# project :/

10 Posts
10 Points
0
jles posted this 07 February 2022

Hi Rob,

This is a known issue that has recently been fixed. Could you please update Docentric to the latest version 6.1.26? Please let us know if this fixes the problem.

Thanks, Jure

154 Posts
294 Points

Our 226181 members have posted 342 times in 101 discussions