Hi, we are in the process of migrating from 2022.2 to 2025.2 and converting all our external app code to use API calls. However, in the meantime, I would like to make our original custom code (using C# and Epicor libraries) to still work with 2025.2. I updated my VS solution with all the new DLLs but I seem to struggle creating a session now.
Original 2022 code was basically:
using (Session session = new Session(strUserName, strPassword, strAppServer, Session.LicenseType.Default, strConfigFile, true, strCompany))
{
}
but in 2025 “Session.LicenseType.Default” gives “Session’ does not contain a definition for ‘LicenseType’” compiling error so I tried to change it to this (which I’m not sure if correct):
using (Session session = new Session(strUserName, strPassword, strAppServer, new Guid(“00000003-B615-4300-957B-34956697F040”), strConfigFile, true, strCompany))
{
}
that line at execution returns the below:
Error at quote line 0: Exception has been thrown by the target of an invocation.:System.TypeInitializationException: The type initializer for ‘Ice.Api.Client.ProxyHttpClientFactory’ threw an exception. —> System.IO.FileLoadException: Could not load file or assembly ‘Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Ice.Api.Client.ProxyHttpClientFactory.CreateHttpClientFactory()
at Ice.Api.Client.ProxyHttpClientFactory..cctor()
— End of inner exception stack trace —
at Ice.Api.Client.ProxyHttpClientFactory.CreateClient(AuthenticationMode authenticationMode)
at Ice.Proxy.Lib.SessionModImpl..ctor(Uri baseAddress, String userId, String password, AuthenticationMode authenticationMode)
Any clue? Thanks in advance.