Nswag: Need .Netcore2.2 Support

Created on 5 Dec 2018  路  9Comments  路  Source: RicoSuter/NSwag

Hi,
As you know Microsoft released .netcore 2.2 and we need NSwag to support this runtime.

Thanks in advance.
Regards

Most helpful comment

Just added a PR #1799 for .net core 2.2 support

All 9 comments

+1

Issues here using NSwag MSBuild with .NET Core 2.2

It would be really great to not have to wait until final releases in future.

A lot of people are in development and using pre-release versions of .NET Core, and it really breaks the whole workflow when you need to use a pre-release version for whatever reason and something as vital as nswag isn't compatible.

I get an error when trying to run aspnetcore2swagger under 2.2 (RTM version):

System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Configuration.IConfiguration' while attempting to activate 'Sample.AspNetCore21.Startup'.

As you can see this is your example startup project namespace here.

  • My application has two DLLS (main website and isolated Web API classes)
  • I copied your startup.cs file to the Web API DLL to be able to run it
  • It's obviously finding it and trying to run it, but having an issue with IConfiguration

My guess is this is simply that I am running against 2.2 but your nswag.msbuild tool is running under 2.1 so the types don't match. Does this sound correct?

Or to put it another way - is there any way to get nswag running under 2.2 or do we need to wait for you to update it?

For now I can just download the json file from a URL and run that through nswag.exe. That seems to be working OK, and is now properly lowercasing my properties without having to use [JsonAttribute]

Just added a PR #1799 for .net core 2.2 support

If anyone can't wait for an stable release just grab the artifact: https://ci.appveyor.com/api/buildjobs/81m5o2qf4ie0pe4p/artifacts/src%2FNSwagStudio%2Fbin%2FNSwag.zip

This approach is not recommend, just a temporal workaround

Will release the new version today or tomorrow.

Thanks for the PR @MarcosMeli

Thanks to you @RSuter for your amazing work in NSwag, our apps architecture become super simplified thanks to your awesome work !!
Thanks for all the tools that you created to cover all scenarios !!

Agreed, thank you @RSuter !

Was this page helpful?
0 / 5 - 0 ratings