- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用的是 VS2019 Pro v16.3.5
我有一个包含 Azure 函数项目的解决方案,该项目引用了多个类库项目。
顶级项目编译失败,错误如下:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0.0" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Base.Core.SharedKernel" Version="1.0.0.23885" />
<PackageReference Include="FluentValidation" Version="8.4.0" />
<PackageReference Include="FluentValidation.AspNetCore" Version="8.4.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="1.8.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="3.0.5" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.27" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Interfaces.Avaloq.Application\Interfaces.Avaloq.Application.csproj" />
<ProjectReference Include="..\Interfaces.Avaloq.Common\Interfaces.Avaloq.Common.csproj" />
<ProjectReference Include="..\Interfaces.Avaloq.Infrastructure\Interfaces.Avaloq.Infrastructure.csproj" />
<ProjectReference Include="..\Interfaces.Avaloq.Persistence\Interfaces.Avaloq.Persistence.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing methods, and they can only be called from within the same thread
最佳答案
如果其他人遇到类似问题,一些信息和解决方法可能有助于解决难题。
It is listed with a strange path "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.logging.abstractions\2.2.0"
C:\Users\xxx\.nuget\packages
.
For
Version Conflict
Microsoft.Azure.WebJobs.Extensions
的链是:
Microsoft.Azure.WebJobs.Extensions --> Microsoft.Azure.WebJobs --> Microsoft.Extensions.Logging.Abstractions(2.1.0)
Microsoft.AspNetCore.App
包,它的链:
Microsoft.AspNetCore.App(2.2.0) --> Microsoft.Extensions.Logging.Abstractions(2.2.0)
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="1.8.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="3.0.5" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
Microsoft.NET.Sdk.Functions
依赖于这些包,nuget 将帮助我们下载并引用它们。
Microsoft.AspNetCore.App
包,因此如果您没有使用该包的特定原因,则无需引用它。
关于.net-core - 无法加载文件或程序集 Microsoft.Extensions.Logging.Abstractions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58510301/
我是一名优秀的程序员,十分优秀!