Adding a net core 6 datasource gives an error

0
stevetaylor posted this 30 January 2024

I am trying to assign a .net core 6 assembly ( .dll) to MS Word Docentric template.

I get the following error:

"The chosen file is locked, is not a valid .NET assembly or one of its assemblies could not be loaded.

Details: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information"

What do i need to do to get the Docentric toolkit to see this dll? It works with a .net framework 4.8 dll but the net Core. I have the latest version installed V6.1 (6.1.45.1679)

Any help would be appreciated Thanks

1 Posts
1 Points
1 Comments
Order By: Standard | Newest | Votes
0
jles posted this 30 January 2024

Hi,

The problem you are experiencing is due to how Docentric Add-In for MS Word loads and analyses .NET assemblies to extract a schema. The Add-In itself is a .NET Framework application, and loading any non-Net Framework (in your case .NET 6) assemblies causes error. For example, when you try to load a .NET 6, the Add-In throws an exception because the assembly cannot be loaded in a .NET Framework application.

This is a known limitation in Docentric v6.1 and we plan to fix this in Docentric 7.0. A viable work-around would be having an empty .NET Framework library project that links all the needed source files (DTOs that you use as data source objects) from your .NET 6 project in order to compile the project into a .NET Framework assembly.

An even better solution, if you can configure your .NET 6 project containing DTOs multitarget project and add .NET Framework as one of the target platforms, that would be even better/easier and less intrusive for your VS solution.

Let me know if any of these workarounds work for you.

Best regards, Jure

155 Posts
295 Points

Our 228723 members have posted 344 times in 102 discussions