1

I seem to have a problem loading .Net Core Web API assembly in NSwagStudio. I have a reference package (NuGet) for 'Microsoft.AspNetCore.Mvc (1.1.2)' in my project but this seems to break the load process on NSwagStudio.

See this example:

enter image description here

I am using VS 2017 and the project is running .Net Core version 1.1. I also tried doing the following:

https://github.com/NSwag/NSwag/wiki/WebApiAssemblyToSwaggerGenerator

It did not work, any advice would much be appreciated.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
Erick Boshoff
  • 1,443
  • 2
  • 18
  • 30

1 Answers1

1

Just publish the project to filesystem so that all required dlls are in the output directory. For .net core you need to add the publish path to the references setting.

Or add the nuget cache to the references path.

Rico Suter
  • 11,548
  • 6
  • 67
  • 93
  • This is indeed the correct way to do it I agree and I will mark this as the accepted answer. But I knew this already the only thing that was wrong is that my visual studio's installation was corrupt, so I could not publish my .Net Core app and extract the .dlls. Thanks for the answer though. :) – Erick Boshoff Mar 27 '17 at 05:27
  • 1
    you can also use the command line to publish `dotnet publish` (if your VS is broken) – Rico Suter Mar 27 '17 at 19:34
  • Awesome suggestion I haven't thought of that .. :P – Erick Boshoff Mar 28 '17 at 05:09