0

I have a library created with Visual Studio 2019 and C#, that basically exposes a method that takes a textfile, doing some magic and returning a JSON. Target Framework is 4.7.2, the GUI is WPF. Now I want to expose this method as Web API.

When I started to check the .NET Framework options I totally got confused by Core 3.1, Standard 2.0 and what else. After some readings I guess it would be best to simply wait for .NET 5.0, but I want to do it now. So any suggestions what's the fastest way to get it done? I'm pretty free what to use, but I guess a .NET websomething that can access my library would be the best?

Thanks in advance,
Frank

Aaginor
  • 4,516
  • 11
  • 51
  • 75
  • https://stackoverflow.com/questions/38063837/whats-the-difference-between-net-core-net-framework-and-xamarin –  Mar 03 '20 at 18:22
  • https://stackoverflow.com/questions/42939454/what-is-the-difference-between-net-core-and-net-standard-class-library-project –  Mar 03 '20 at 18:22
  • https://stackoverflow.com/questions/44085424/net-standard-vs-net-core/48837359 –  Mar 03 '20 at 18:23

1 Answers1

1

As you said, I do believe you are confused about this whole .Net Core and .Net Standard story, please reffer to this documentation link in order to get some clarification.

As for exposing your method to be consumed as an API, you can do it using C# in the following ways:

  • Azure Functions will give you a serverless way to make your code available.
  • ASP.NET Web API 2 will give you a very MVC-like perspective on offering your code as an API.

In both ways you'll be able to consume your 4.7.2 .Net Framework library.

  • Thank you very much, that helped a lot to find the right direction (towards Web API). It's up and running :) – Aaginor Mar 11 '20 at 08:46