我真的不明白发生了什么。
我尝试重新安装Peged.Mvc 4.5,因为他无法还原但软件包安装失败。
这是我的项目(link):
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<UserSecretsId>aspnet-CakeStore.App-AC71878A-B74D-42FA-9DBD-6A49AEF1E9A1</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Abstractions" Version="2.2.0" />
<PackageReference Include="MimeMapping" Version="1.0.1.12" />
<PackageReference Include="PagedList.Mvc" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\Users\Controllers\" />
<Folder Include="Areas\Users\Data\" />
<Folder Include="Areas\Users\Models\" />
<Folder Include="Areas\Users\Views\" />
<Folder Include="wwwroot\images\products\" />
<Folder Include="wwwroot\images\User\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CakeStore.Data.Admin\CakeStore.Data.Admin.csproj" />
<ProjectReference Include="..\CakeStore.Data.Logging\CakeStore.Data.Logging.csproj" />
<ProjectReference Include="..\CakeStore.Data.Products\CakeStore.Data.Products.csproj" />
<ProjectReference Include="..\CakeStore.Data\CakeStore.Data.csproj" />
</ItemGroup>
<ItemGroup>
<Content Update="Areas\Admin\Views\Shared\Error.cshtml">
<Pack>$(IncludeRazorContentInPack)</Pack>
</Content>
<Content Update="Areas\Admin\Views\Shared\_CookieConsentPartial.cshtml">
<Pack>$(IncludeRazorContentInPack)</Pack>
</Content>
<Content Update="Areas\Admin\Views\Shared\_StatusMessage.cshtml">
<Pack>$(IncludeRazorContentInPack)</Pack>
</Content>
<Content Update="Areas\Admin\Views\Shared\_ValidationScriptsPartial.cshtml">
<Pack>$(IncludeRazorContentInPack)</Pack>
</Content>
<Content Update="Areas\Admin\Views\_ViewImports.cshtml">
<Pack>$(IncludeRazorContentInPack)</Pack>
</Content>
<Content Update="Areas\Admin\Views\_ViewStart.cshtml">
<Pack>$(IncludeRazorContentInPack)</Pack>
</Content>
</ItemGroup>
</Project>
错误:
严重性代码描述项目路径文件行抑制状态 错误NU1107发现版本冲突 Microsoft.AspNetCore.Authentication.Abstractions。安装/参考 Microsoft.AspNetCore.Authentication.Abstractions 2.2.0直接将 项目CakeStore.App解决此问题。 CakeStore.App-> CakeStore.Data-> Microsoft.AspNetCore.Mvc.DataAnnotations 2.2.0-> Microsoft.AspNetCore.Mvc.Core 2.2.0-> Microsoft.AspNetCore.Authorization.Policy 2.2.0-> Microsoft.AspNetCore.Authentication.Abstractions(> = 2.2.0)
CakeStore.App-> Microsoft.AspNetCore.App 2.1.1-> Microsoft.AspNetCore.Authentication.Abstractions(> = 2.1.1 && < 2.2.0)。 CakeStore.App D:\ C#\ GITHUB \ Cake-Store-App \ CakeStore.App D:\ C#\ GITHUB \ Cake-Store-App \ CakeStore.App \ CakeStore.App.csproj 1
我尝试直接安装到项目中,但收到相同的错误。我读了许多问题,但钢铁无法理解。
答案 0 :(得分:0)
您混合使用不同版本的网络核心。尝试将所有项目更新到net core 2.2。
Cakestore.data正在使用2.2.0 cakestore.app使用的是2.1.1