RicoSuter/NSwag

Npm CLI runtime parameter conflict

Open

#1,869 opened on Jan 4, 2019

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C# (1,189 forks)batch import
help wantedtype: bug

Repository metrics

Stars
 (6,291 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hello,

I have been trying to use the npm cli to generate the swagger definition of an ASP.NET Core using the project file (.csproj) with the aspnetcore2swagger command, but the thing is that when I use the runtime parameter for the npm cli know which version of the "real" cli to use the AspNetCoreToSwaggerGenerator also uses the same runtime parameter and it fails because of that. When I try to use the "NetCore22" runtime I get an error like:

project.assets.json doesn't have a target for '.NETCoreApp,Version=v2.2/NetCore22'

As a workaround I can always generate the nswag.json with the run command.

Contributor guide