question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for .NetCoreApp 1.1

See original GitHub issue

I’m trying to add Swashbuckle to a new .NET Core 1.1 Web API app, using VS Code as an IDE. When I run the command:

dotnet add package Swashbuckle.AspNetCore -v 1.0.0-*

I get the response:

$ dotnet add package Swashbuckle.AspNetCore -v 1.0.0-*
Microsoft (R) Build Engine version 15.1.1012.6693
Copyright (C) Microsoft Corporation. All rights reserved.

  Writing C:\Users\bpowell\AppData\Local\Temp\tmpAE3D.tmp
info : Adding PackageReference for package 'Swashbuckle.AspNetCore' into project 'C:\code\services\telemetry\*********.Services.Telemetry.csproj'.
log  : Restoring packages for C:\code\services\telemetry\*********.Services.Telemetry.csproj...
info :   GET http://nuget.cf.********.net/nuget/FindPackagesById()?id='Swashbuckle.AspNetCore'
info :   OK http://nuget.cf.*******.net/nuget/FindPackagesById()?id='Swashbuckle.AspNetCore' 51ms
error: Unable to resolve 'Swashbuckle.AspNetCore (>= 1.0.0)' for '.NETCoreApp,Version=v1.1'.
error: Package 'Swashbuckle.AspNetCore' is incompatible with 'all' frameworks in project 'C:\code\services\telemetry\*********.Services.Telemetry.csproj'.

My project file looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <Folder Include="wwwroot\"/>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore" Version="1.1.1"/>
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2"/>
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="1.1.1"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.1"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.0"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.1"/>  
  </ItemGroup>
</Project>

I’m aware that this issue appears to be similar to a couple of other issues, #232 and #239, but they don’t seem to address this specific issue.

Please let me know if there’s any other information I can provide, or anything else I can do to help. If I get some time later this week I’ll try a few other things, but requests from Product Managers wait for no man…

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

7reactions
BarneyPowellcommented, May 11, 2017

Solution (workaround) found

OK - For anyone else who might have the same issue, the problem may lie with the source you are using for the NuGet packages. I’ve managed to get it to restore without issue by specifying the exact source:

dotnet add package Swashbuckle.AspNetCore -s https://api.nuget.org/v3/index.json

If you use the older v2 source it doesn’t work. I’ve not figured out how to tell ‘dotnet add package’ to use a different Nuget.config file, and if I add a .nuget folder and Nuget.Config file to my solution, it doesn’t get used. So it looks like the workaround is to use the ‘-s’ flag and specify the v3 package source manually.

0reactions
BarneyPowellcommented, May 11, 2017

OK, might be an issue with NuGet rather than this package, as I’m seeing the same issue with FluentValidation.AspNetCore, and I found this issue Package ‘NameOfPackage’ is incompatible with ‘all’ frameworks in project which seems to be the same thing I’m seeing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET and .NET Core official support policy
Community support is a great way to get help and even contribute to the projects. For more information, see the Community page.
Read more >
Microsoft.NETCore.App 1.1.1
A set of .NET API's that are included in the default .NET Core application model. When using NuGet 3.x this package requires at...
Read more >
How to fix 'Microsoft.NETCore.App', version '1.1.2' was not ...
The error tells you that you need to download Microsoft. NETCore. App , version 1.1. 2 you can install it through this link....
Read more >
.NET Core 1.1 release – What Is It? – A Journey In .NET Core
Along side all of the OS's that version 1.0 supported, .NET Core 1.1 now supports: Linux Mint 18; OpenSUSE 42.1; macOS 10.12; Windows...
Read more >
Can't run C# using .NET Core 1.1.0 on Rider
I'm trying to run a simple "HelloWorld.cs" program on Rider EAP, details below: Rider 1.0 EAP Build #RS-163.12057, built on January 17, 2017...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found