Каждый раз, когда я пытаюсь обновить «Microsoft.Extensions.Primitives», происходит сбой следующим образом:
GET https://api.nuget.org/v3/registration4-gz-semver2/microsoft.extensions.primitives/index.json
OK https://api.nuget.org/v3/registration4-gz-semver2/microsoft.extensions.primitives/index.json 142ms
Getting restore information for project /Users/developer/Source/WebApp-001/WebApp-001/WebApp-001.csproj
Running non-parallel restore.
Reading project file /Users/developer/Source/WebApp-001/WebApp-001/WebApp-001.csproj.
Persisting no-op dg to /Users/developer/Source/WebApp-001/WebApp-001/obj/WebApp-001.csproj.nuget.dgspec.json
Restoring packages for /Users/developer/Source/WebApp-001/WebApp-001/WebApp-001.csproj...
Restoring packages for .NETCoreApp,Version=v3.1...
GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.primitives/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.extensions.primitives/index.json 3473ms
Resolving conflicts for .NETCoreApp,Version=v3.1...
Unable to find package Microsoft.Extensions.Primitives with version (>= 3.1.1)
- Found 36 version(s) in nuget.org [ Nearest version: 3.1.0 ]
Package restore failed. Rolling back package changes for 'WebApp-001'.
Я использую. NET Core 3.1 в качестве моей целевой платформы на macOS с использованием Visual Studio. Я тоже попробовал обновиться с терминала, не повезло. Этот пакет NuGet и некоторые другие не могут быть обновлены до версии 3.1.1. Похоже, что все они «застряли» в версии 3.1.0.
Может, кто-то сталкивался с этой проблемой раньше? Я не понимаю, почему «[невозможно] найти пакет Microsoft.Extensions.Primitives с версией (> = 3.1.1).»
Копия моего файла .csproj:
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>WebApp_001</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(RunConfiguration)' == 'TheMidtownModel' ">
<StartAction>Project</StartAction>
<ApplicationURL>http://localhost:5002</ApplicationURL>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="3.1.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.RazorPages" Version="2.2.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Sendgrid" Version="9.12.6" />
<PackageReference Include="React.AspNet" Version="5.1.2" />
<PackageReference Include="JavaScriptEngineSwitcher.ChakraCore" Version="3.3.0" />
<PackageReference Include="JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64" Version="3.3.0" />
<PackageReference Include="JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64" Version="3.3.0" />
<PackageReference Include="JavaScriptEngineSwitcher.ChakraCore.Native.win-x64" Version="3.3.0" />
<PackageReference Include="JavaScriptEngineSwitcher.Extensions.MsDependencyInjection" Version="3.3.0" />
<PackageReference Include="Twilio.AspNet.Core" Version="5.33.1" />
<PackageReference Include="Twilio" Version="5.37.3" />
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.19" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.0" />
</ItemGroup>
<ItemGroup>
<Content Remove="wwwroot\css\bootstrap-grid.min.css" />
<Content Remove="wwwroot\css\bootstrap.min.css" />
<Content Remove="wwwroot\css\bootstrap.min.css.map" />
<Content Remove="wwwroot\js copy\__bootstrap.bundle.min.js" />
<Content Remove="wwwroot\js\bootstrap.js" />
<Content Remove="BackUpFiles\appsettings.Development.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="Views\Admin\" />
<Folder Include="Views\RoleAdmin\" />
<Folder Include="Views\Claims\" />
<Folder Include="Views\FileUpload\" />
<Folder Include="Authorization\" />
<Folder Include="Views\Shared\Layouts\" />
<Folder Include="Views\Shared\Partial\" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Migrations\20191216040205_SecondUpdateAlbumField.cs" />
<Compile Remove="Migrations\20191216040205_SecondUpdateAlbumField.Designer.cs" />
<Compile Remove="Migrations\20191216040329_ThirdUpdateAlbumField.cs" />
<Compile Remove="Migrations\20191216040329_ThirdUpdateAlbumField.Designer.cs" />
</ItemGroup>
</Project>