CBielstein / APRSsharp

APRS# - Modern APRS software for the amateur radio community
MIT License
12 stars 5 forks source link

Update APRS parser from .NET Framework 4.5 to .NET Standard #6

Closed CBielstein closed 4 years ago

CBielstein commented 4 years ago

The APRS parsing code was originally implemented for .NET Framework 4.5 as a portable class library. We should move this in to the future with .NET Standard, which is the much more modern (and much easier) model for cross platform libraries.

Honestly, the fastest way to do this is probably to just delete the .csproj file and create a new one with dotnet new classlib from within the directory. Likely want 2.1 instead of 2.0, so change that if appropriate inside the .csproj after creating. For the unit tests, do a similar process but dotnet new xunit

For this issue to be done:

CBielstein commented 4 years ago

In the test directory, we want to create a new xunit test project with dotnet new xunit

CBielstein commented 4 years ago

Geocoordinate is referenced in the code and will fail compilation because it doesn't exist there. To get around this, add the following nuget package to the project:

Package: https://www.nuget.org/packages/GeoCoordinate.NetCore Install command: dotnet add package GeoCoordinate.NetCore --version 1.0.0.1 (run from the project directory in src)

CBielstein commented 4 years ago

For the unit test project, like we discussed you should:

  1. Make a new xunit project instead of classlib dotnet new xunit (after deleting the old Properties directory and old .csproj)
  2. Add reference to the APaRSer project itself using dotnet add <project> reference <targetproject>
eddywine commented 4 years ago

@CBielstein I have now pushed these changes