当我尝试加载Microsoft.Extensions.DependencyInjection.Abstractions
组件的2.2.0版本时,出现以下错误。我的.net核心Web应用程序始终尝试加载2.1.0
程序集。所有程序集引用均指向2.2.0
版本。请找到以下加载错误。
无法加载文件或程序集“ Microsoft.Extensions.DependencyInjection.Abstractions,版本= 2.1.0.0,文化=中性,PublicKeyToken = adb9793829ddae60”或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040)“:” Microsoft.Extensions.DependencyInjection.Abstractions,版本= 2.1.0.0,区域性=中性,PublicKeyToken = adb9793829ddae60
CSPROJ文件:
<Project Sdk="Microsoft.NET.Sdk.Web">
<ItemGroup>
<PackageReference Include="Alachisoft.NCache.SDK" Version="4.9.1" />
<PackageReference Include="Alachisoft.NCache.SessionServices" Version="4.9.1" />
<PackageReference Include="Alachisoft.NCache.SessionStateProvider" Version="4.9.1" />
<PackageReference Include="AutoMapper" Version="8.1.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.1.0" />
<PackageReference Include="EntityFramework" Version="6.2.0" />
<PackageReference Include="log4net" Version="2.0.8" />
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.7" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.ResponseCaching" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Session" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
<PackageReference Include="Moment.js" Version="2.24.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="NLog" Version="4.6.3" />
<PackageReference Include="NLog.MailKit" Version="3.0.2" />
<PackageReference Include="NLog.Schema" Version="4.6.3" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.8.2" />
<PackageReference Include="StackExchange.Redis.Extensions.NetCore" Version="1.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="Telerik.UI.for.AspNet.Core" Version="2018.3.1017" />
<PackageReference Include="Telerik.Windows.Documents.Core" Version="2019.2.612" />
<PackageReference Include="Telerik.Windows.Documents.Fixed" Version="2019.2.612" />
<PackageReference Include="Telerik.Windows.Documents.Spreadsheet" Version="2019.2.612" />
<PackageReference Include="Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml" Version="2019.2.612" />
<PackageReference Include="underscore.js" Version="1.8.3" />
<PackageReference Include="WindowsBase" Version="4.6.1055" />
<PackageReference Include="Z.EntityFramework.Plus.EF6" Version="1.8.25" />
</Project>