x
Developer

Square-Connect API compatible with ASP.net Core?

Hello, I'm working with a client on an application that uses ASP .NET core. When I run the package manager on NuGet to install the files, I'm getting a " Package Square.Connect 2.0.2.71 is not compatible with netcoreapp1.0 ". I was wondering if the API supports ASP .NET core.

Tags (2)
1,344 Views
Message 1 of 3
Report
2 REPLIES 2
Developer

The Square.Connect C# client library looks like it's written for .NET Framework 4.5 (the library's packages.config reads targetFramework="net45"), not .NET Core. See this Stackoverflow question with the same issue for a different C# library. It seems like you may have a hope of modifying & recompiling it in a way to get it working, but that depends entirely on the library internals. Sorry I'm not too familiar with .NET, perhaps someone else would know if this is feasible!

 

Of course the API itself is language-agnostic. If you only need a few simple API calls, you'd probably have better luck just using the C# HTTP and JSON libraries to make your own calls directly without relying on a client library. Of course there are benefits of the client library if you need to manage complex client state or utilize a lot of different API endpoints without writing your own wrappers for them.

1,318 Views
Message 2 of 3
Report
Developer

I think we're just going to downgrade our framework to 4.5 from core to make this work. Thank you!

1,312 Views
Message 3 of 3
Report