Upgrading to .Net Core (.net8.0)
Question asked by Mick Duprez - 5/30/2024 at 4:43 AM
Answered
I've been happily using the output from the XML Data Binder for nearly 10 years but I've come across a problem when trying to use my C# assembly in a host application that uses .Net 8.0 (and/with core).

After debugging I can pin point the place of exception to the root element init() here:
        protected override void Init()
        {
            <MyNameSpace>.Registration.iRegistrationIndicator = 0; // causes registration to take place
and the inner exception is:
InnerException    {"Unable to load DLL 'mscorwks.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)"}    System.Exception {System.DllNotFoundException}
My suspicion is that as this is a old .net framework dll, .Net Core doesn't like loading it (or can't find it) but if I copy the dll locally to the my app folder then all works as expected.
This isn't ideal, is there a way to create a .Net Core version of the Data Binder redistributable assembly?


thanks,
Mick

Liquid Support Replied
Employee Post Marked As Answer
Hi Mick,

The XML Data Binder runtime (LiquidTechnologies.Runtime) supports .Net Standard 2.0, so you should not have an issue running with a .Net 8.0 application. Note: the Wizard UI only supports up to .Net 7.0, but you can manually changed the generated .csproj file to 8.0)

- I tried this and it worked OK.

However, the LiquidTechnologies.Viewer, only support .Net Framework 4.5. So you will see the error you reported if you try to use the viewer with a .Net 8.0 application.

- When I added the Viewer I was able to replicate the error you see.

We will look to update the Viewer to support .Net 8.0 in the next release.

UPDATE: The option to select .Net 8.0 has now been added to the XML Data Binding Wizard v20.7.10, and the Viewer Nuget now supports .Net 6.0+.

Mick Duprez Replied
Thanks for the detailed answer and confirmation of the problem. It looks like I'll need to have 2 builds until all the app's using my this assemblies are using .Net >2

I'll have to upgrade I think as I haven't really used the wizard/tools for about 8 years, the assemblies have always just worked :)

cheers,
Mick

Reply to Thread