PaySimple / PaySimpleSDK

.NET SDK for PaySimple API v4
Other
4 stars 1 forks source link

Feature/netstandard 2dot0 support #27

Open WillBDaniels opened 5 years ago

WillBDaniels commented 5 years ago

This turns the project into a .netstandard 2.0 project. It's nice, because it vastly simplifies the csproj file, along with making it compatible with things like xamarin, etc. Increasing it's utility.

This PR fixes #21

scottlance commented 5 years ago

I would suggest instead of .netcoreapp2.0 that you make the Target Framework netstandard2.0. Otherwise you beat me to it.

On Mon, Jul 1, 2019 at 3:34 PM William Daniels notifications@github.com wrote:

This turns the project into a .netstandard 2.0 project. It's nice, because it vastly simplifies the csproj file, along with making it compatible with things like xamarin, etc. Increasing it's utility.

This PR fixes #21 https://github.com/PaySimple/PaySimpleSDK/issues/21

You can view, comment on, or merge this pull request online at:

https://github.com/PaySimple/PaySimpleSDK/pull/27 Commit Summary

  • WIP on this
  • making the project .netstandard 2.0 compatible.

File Changes

Patch Links:

— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/PaySimple/PaySimpleSDK/pull/27?email_source=notifications&email_token=AADATQ3P4HBVB7UA35HMHATP5JZ5FA5CNFSM4H4WFEIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G4XT5HQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AADATQ2RRNHFW2TYWX4ZXNDP5JZ5FANCNFSM4H4WFEIA .

WillBDaniels commented 5 years ago

@ScottDLance Sadly, for the unit test project to run, you have to have that project target .netcoreapp specifically. Check out the FAQ section here: https://github.com/nunit/docs/wiki/.NET-Core-and-.NET-Standard The actual SDK itself does target netstandard2.0, however. The Harness targeting netcoreapp seemed reasonable, as it's sort of a mini .net core console app at this point.

ScottDLance commented 5 years ago

@WillBDaniels It's been my experience that if I haven't put the library in the latest template and updated the tests to the latest template you get what we're seeing here. I could take a whack at it, basically all I would do is Project New the library and tests with the .NET Core templates, set the library to netstandard2, the tests to netcoreapp2.0. The .proj file for the library is still using the older template and like I said that seems to cause issues. If you want me to branch it I could probably take a look at it tonight.

ScottDLance commented 5 years ago

@WillBDaniels William, I don't seem to have access to push and create a pull request.

WillBDaniels commented 5 years ago

@WillBDaniels William, I don't seem to have access to push and create a pull request.

Give it a shot now, it looks like maybe we had one of your alternate accounts listee as a collaborater. I just sent you a request to the other one

ScottDLance commented 5 years ago

@WillBDaniels I submitted a request to whoever owns the repo to give my gitkraken access to your organization. Sorry for the 2 accounts, one is my work account, the other is my personal.

WillBDaniels commented 5 years ago

No problem! I went ahead and approved it.

Thanks again for your help with this, and your continued work and support on the project in general.

-

On Tue, Jul 2, 2019, 11:47 AM Scott Lance notifications@github.com wrote:

@WillBDaniels https://github.com/WillBDaniels I submitted a request to whoever owns the repo to give my gitkraken access to your organization. Sorry for the 2 accounts, one is my work account, the other is my personal.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PaySimple/PaySimpleSDK/pull/27?email_source=notifications&email_token=ABDEOPWZ5E4TRPCNEPBGPDLP5OICFA5CNFSM4H4WFEIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZCBRJY#issuecomment-507779239, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDEOPVCN4A4VOT24XJMEILP5OICFANCNFSM4H4WFEIA .

ScottDLance commented 5 years ago

I attached my changes to this pull request. If you get the latest on the branch you should see my changes

WillBDaniels commented 5 years ago

@ScottDLance I'm going to get this merged in tomorrow. I went ahead and updated it to also target .net framework 4.5, like it was before, so that it will publish multiple binaries. This should allow legacy compatibility support with the sdk itself, along with support for .netstandard 2.0 I'm going to make 2 separate nuget releases, one for the changes I merged earlier, and then I'll get this merged and versioned/tagged.

ScottDLance commented 5 years ago

We may want to look at the TFM docs. If I read the chart at https://docs.microsoft.com/en-us/dotnet/standard/net-standard right, then net45 should already be compatible with netstandard2.0.

Let me know what you think

On Jul 2, 2019 4:56 PM, William Daniels notifications@github.com wrote:

@ScottDLancehttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FScottDLance&data=01%7C01%7Cslance%40cmnhospitals.org%7C0d5912cf2b2e4972334a08d6ff40873c%7C89514cfae7464a52914a08a7c7ca84fe%7C1&sdata=2iuIpuQCIyzFzi%2Bp0wnM6CZYrkP5ZjrS0GHOqWno1Fk%3D&reserved=0 I'm going to get this merged in tomorrow. I went ahead and updated it to also target .net framework 4.5, like it was before, so that it will publish multiple binaries. This should allow legacy compatibility support with the sdk itself, along with support for .netstandard 2.0 I'm going to make 2 separate nuget releases, one for the changes I merged earlier, and then I'll get this merged and versioned/tagged.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FPaySimple%2FPaySimpleSDK%2Fpull%2F27%3Femail_source%3Dnotifications%26email_token%3DAASGZDT4FL3DEMXXUBZ5WKLP5PMKBA5CNFSM4H4WFEIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZCYXZI%23issuecomment-507874277&data=01%7C01%7Cslance%40cmnhospitals.org%7C0d5912cf2b2e4972334a08d6ff40873c%7C89514cfae7464a52914a08a7c7ca84fe%7C1&sdata=2%2BzN4MLsImoN4o940rQyta1JkgTe19DjiDO8755NETU%3D&reserved=0, or mute the threadhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAASGZDTLGBAQMXD2PEABJD3P5PMKBANCNFSM4H4WFEIA&data=01%7C01%7Cslance%40cmnhospitals.org%7C0d5912cf2b2e4972334a08d6ff40873c%7C89514cfae7464a52914a08a7c7ca84fe%7C1&sdata=%2B1tT3PHndmS%2Bgs0bMqOec0POA92XPWm1THa2GqG58Fs%3D&reserved=0.

WillBDaniels commented 5 years ago

If you look at the interactive chart here: https://dotnet.microsoft.com/platform/dotnet-standard#versions the compatibility becomes a little more clear cut. 4.5 is only compatible with .netstandard 1.1 and 1.0, as far as I can tell.