dlubal-software / Dlubal_CSharp_Client

C# library and client (or high-level functions) for RFEM 6 and RSTAB 9 using Web Services, SOAP and WSDL
MIT License
10 stars 10 forks source link

RFEMWebServiceLibrary not loading in NET7 / NET8 #50

Open michaelvantelgen-Arcadis opened 8 months ago

michaelvantelgen-Arcadis commented 8 months ago

Hi all,

It looks like RFEMWebServiceLibrary is not loading well in .NET 7 / .NET 8 libraries:

image

The message reads:

Package 'Dlubal.RFEMWebServiceLibrary 6.4.13' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net8.0'. This package may not be fully compatible with your project.

I was also unable to get the RFEMWebServiceLibrary to compile in .NET 8 to resolve this issue. See this PR.

Can anyone provide assistance?

Thank you!

NathanMSY commented 8 months ago

I had a similar problem with .NET 6. The defined dependencies of the RFEMWebServiceLibrary seem to be the problem in my case as they are too specific:

2024-01-11 11_54_37-MSYConfigurator - Microsoft Visual Studio

In my case, the target framework of my app was "NET6.0" but the Target-Framework of the RFEM Library is "net6.0-windows10.0.22621". I manually changed the target framework of my app to match the one the RFEM library needs and no issues anymore. Maybe this helps.

michaelvantelgen-Arcadis commented 8 months ago

Hi @NathanMSY, thank you for your insights. I used a similar approach where I ended up importing the RFEMWebServiceLibrary as a local reference rather through NuGet.

However, compiling the library directly in .NET 8 failed do to unclear reasons.