RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.7k stars 1.24k forks source link

Using asp.net core web api to generate client throws exception #1297

Open TedMobile opened 6 years ago

TedMobile commented 6 years ago

Hi Trying to use Nswag studio to generate client from an asp.net core web api (works with full framework) Nswag:11.17.2.0

I do the following

1) Create a new webapi (asp.net core) 2)updates all the nuget packages and include nswag core to it + System.Net.Http and annotation 3)build my api 4)Publish api 5) open Nswag studio 6)Select webApi or asp.net core assembly tab 7) point i to my webApi.dll in debug 8)paste the directory location where all the files where published 9)check "assembly is using asp.net core 10) load assembly and I get

image

Suggestions? thanks

RicoSuter commented 6 years ago

Some dlls are missing in the output, see https://github.com/RSuter/NSwag/wiki/Assembly-loading#net-core