添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using Visual Studio 15.9.6
Launch the PackageManager console
PM> Install-Package Swashbuckle.Core

EXPECTED RESULT:

Swashbuckle installs successfully

ACTUAL RESULT:

Fails to install

ADDITIONAL DETAILS

PackageManager Console output:
Restoring packages for C:\Users\source\repos\Service\Service\Service.API.csproj...
NU1701: Package 'Microsoft.AspNet.WebApi.Core 4.0.20710' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.2'. This package may not be fully compatible with your project.
NU1701: Package 'Swashbuckle.Core 5.6.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.2'. This package may not be fully compatible with your project.
Install-Package : NU1107: Version conflict detected for Microsoft.AspNet.WebApi.Client. Install/reference Microsoft.AspNet.WebApi.Client
5.2.6 directly to project CustomerService.API to resolve this issue.
CustomerService.API -> Microsoft.AspNetCore.App 2.2.0 -> Microsoft.AspNet.WebApi.Client (>= 5.2.6 && < 5.3.0)
CustomerService.API -> Swashbuckle.Core 5.6.0 -> Microsoft.AspNet.WebApi.Core 4.0.20710 -> Microsoft.AspNet.WebApi.Client (>= 4.0.20710 &&
< 4.1.0).
At line:1 char:1

  • Install-Package Swashbuckle.Core
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    

    Install-Package : Package restore failed. Rolling back package changes for 'CustomerService.API'.
    At line:1 char:1

  • Install-Package Swashbuckle.Core
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
              

    I've used Swashbuckle for Web API projects before and it works like a charm. But now I'm trying to use the Swashbuckle.AspNetCore on my .Net Core 2.1 MVC project (this is not a WebAPI project), and it installs with no errors, but it doesn't work. I don't see it creating a SwaggerConfig.cs file. So, my question is, will this work for a none WebApi project? i.e. just an MVC project?