提问人:Faouzeya 提问时间:11/11/2023 更新时间:11/11/2023 访问量:15
NU1102 找不到版本为 (>= 6.0.0) 的软件包 Communications.Interface
NU1102 Unable to find package Communications.Interface with version (>= 6.0.0)
问:
我有一个名为 Communications.Interface 的 .net 类库,这是这个项目的 .csproj :
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Title>Communications Interface</Title>
<Authors>X</Authors>
<Description>Communication services</Description>
<PackageReleaseNotes>Added language to notification templates.</PackageReleaseNotes>
<Copyright>2022-2023</Copyright>
<PackageId>Communications.Interface</PackageId>
<PackageVersion>2.0.0</PackageVersion>
</PropertyGroup>
</Project>
我想升级这个库的包版本,所以我把它从我构建它更改为,一切都很顺利,直到我在同一个解决方案中引用这个库,称为通信。<PackageVersion>2.0.0</PackageVersion>
<PackageVersion>6.0.0</PackageVersion>
这是通信项目的 .csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Title>Communications</Title>
<Authors>X</Authors>
<Description>Communication services</Description>
<PackageReleaseNotes>Communication services</PackageReleaseNotes>
<Copyright>2022-2023</Copyright>
<PackageId>Communications</PackageId>
<PackageVersion>2.0.0</PackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MailKit" Version="4.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Communications.Interface" Version="2.0.0" />
</ItemGroup>
</Project>
因此,我当然从更改为,并将包版本从更改为并构建它。<PackageReference Include="Communications.Interface" Version="2.0.0" />
<PackageReference Include="Communications.Interface" Version="6.0.0" />
<PackageVersion>2.0.0</PackageVersion>
<PackageVersion>6.0.0</PackageVersion>
然后它给了我这个错误:
Severity Code Description Project File Line Suppression State
Error NU1102 Unable to find package Communications.Interface with version (>= 6.0.0)
- Found 4 version(s) in DotNetPackages [ Nearest version: 2.0.0 ]
- Found 0 version(s) in nuget.org Communications
谁能帮我? PS:我还没有在 azure 中发布此更改
答: 暂无答案
评论