Home > Enterprise >  dotnet crash using POSForDotNet.SDK
dotnet crash using POSForDotNet.SDK

Time:10-09

I need to write a dotnet forms project that uses POS scanners. I am trying to use the POSForDotNet.SDK v1.14.1. I included it with NuGet and can build the app fine, however I see a warning in visual studio:

Package 'POSForDotNet.SDK 1.14.1' 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' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.

When I run the project I get an immediate crash on this line explorer = new PosExplorer(this);

The crash is:

Inner Exception
MissingMethodException: Method not found: 'Void System.AppDomainSetup.set_ApplicationBase(System.String)'.

Not sure if its related to the warning above or not - Does anyone know how to go about fixing these issues? First time using dotnet so not sure if theres something obvious im missing.

CodePudding user response:

Target framework for your project is .NET Core 3.1 but POSForDotNet.SDK v1.14.1 does not support .NET Core 3.1.

Only fix is to change target framework of your project to .NET Framework instead of .NET Core.

  • Related