Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

454
Views
Error trying to create a webapi in Visual Studio Code

I get this message in the terminal:

error NU1100: Unable to resolve 'Swashbuckle.AspNetCore (>= 5.6.3)' for 'net5.0'

I tried to run dotnet restore as it reccomended but it will not restore

over 4 years ago · Santiago Trujillo
4 answers
Answer question

0

Could you make sure your .csproj file looks a little bit like this?

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
  </ItemGroup>

</Project>
over 4 years ago · Santiago Trujillo Report

0

The problem may be with the missing of the nuget packages. I had the same problem.
Try these steps:

  1. Install the matching Nuget version from https://www.nuget.org/downloads
  2. If you already created a project, try adding --force after the new sln and web api creation commands to update the files.
over 4 years ago · Santiago Trujillo Report

0

I was trying to build an API using dotnet CLI as well, for a couple of days now. Ended up getting no answer from microsoft, or another source of info.

Anyways, the only way I made it work was unstalling .NET SDK 5.0.203 (Latest version for the time being), and installing .NET SDK 5.0.101, and thats it, new api command works flawlessly.

over 4 years ago · Santiago Trujillo Report

0

Just got the same issue on a clean machine. I managed to fix it running the command:

dotnet nuget add source --name nuget.org https://api.nuget.org/v3/index.json

After that, create/restore your project and it should work.

source

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!