【发布时间】:2022-01-03 06:45:33
【问题描述】:
我创建了一个 Azure 功能应用程序,但在调试模式下找不到下面提到的程序集
System.Private.CoreLib: Could not load file or assembly
'Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral,
PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
虽然我引用了它,但在输出文件夹中,当我导航到此特定文件的属性时,它会显示文件版本“5.0.20.51904”
下面是我的项目文件
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Scheduler.Core\**" />
<EmbeddedResource Remove="Scheduler.Core\**" />
<None Remove="Scheduler.Core\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AzureFunctions.Autofac" Version="4.0.1" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="SyncFeed_Scheduler.Core\SyncFeed_Scheduler.Core.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
【问题讨论】:
标签: c# .net-core azure-functions