.NET Core Compatibility with Sage 50 US SDK/API

SOLVED

Hi.  Is the Sage 50 US .NET SDK/API compatible with .NET Core 2.2?  If not, what's the ETA now that Microsoft has announced that .NET Core will replace .NET Framework?

If yes, it is compatible, then I'm having a problem I really need some help with, please.  My .NET Core console app / web host is trying to connect to Sage 50 US (desktop, not cloud) locally, and I get the following error:

System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
File name: 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
   at Sage.Peachtree.Domain.GlobalContextExternal.GetDBNServer()
   at Sage.Peachtree.Domain.GlobalContextExternal.PreOpen()
   at Sage.SBD.ACS.Framework.BusinessLogic.ContextBase.OpenTemplateMethod(Boolean sageDriveHoldLock)
   at Sage.Peachtree.API.GlobalContext.Open()
   at Sage.Peachtree.API.PeachtreeSession.Begin(String applicationIdentifier)

The rest of the call stack contains my code.  My app doesn't use WinForms, nor is any kind of WinForms compatible with .NET Core 2.2, so it wouldn't be possible to load System.Windows.Forms v4; that makes me think this SDK isn't compatible with .NET Core.

I'm using the 2019.0 version of the Sage 50 SDK, and I'm on Windows Server 2012 R2.

Thanks in advance.

Parents Reply Children
  • 0 in reply to PBarranis

    Sage 50 is very unlikely to move to .NET Core in the future. However, Microsoft recently released their roadmap for .NET technologies. .NET Framework 4.8 has recently been released, and .NET Core 3.0 is coming this fall. The next .NET release v5.0, is planned for the fall of 2020, and will unify .NET Framework and Core into a single technology. While there are a few .NET Framework technologies that will not make the leap into .NET v5.0 (WebForms, WCF Server and Windows Workflow), it would appear we should be able to adopt this new version of .NET after it becomes available.

    You might see this in Sage 50 US R2022.0, at the earliest.

    I suggest if you need to interface with Sage 50 US, you do it from a .NET Framework application. You can do this as a separate web service or console app so your main web host can still use .NET Core.

     That’s going to be the only way to interoperate until everything is on .NET v5.0 .

  • 0 in reply to SoumenS

    Thank you SoumenS.  .NET 5 is actually .NET Core 5; dropping "Core" from the name is simply a branding choice.  There is no unification.  .NET Framework is being moved to a long-term phase out after v4.8, as the link I sent from Microsoft points out.  Please note it's directly from the DPM of .NET; that's very much "the horse's mouth."

    I guess my question really should have been when Sage 50 SDK will support .NET Standard.  That is really the future here, and supporting Standard means it will work with both Core and Framework, which is really the best of both worlds.

    I hope Sage will consider working on a version of the SDK supporting either .NET Core or .NET Standard sooner.  By 2022 .NET Framework will have been long-since dead in the water.  Any developer worth hiring doesn't want to work on a platform that's been "stuck" for years, so the downstream effects on the companies that integrate with Sage will be meaningful.  Our own company will be moving the last product in our portfolio to .NET Core in the coming 12 months.  Everything else is already there.