Unable to refer "Microsoft.Extensions.Logging.Abstractions" in the Azure Function

Viswanath Vankadari 10 Reputation points
2023-09-11T17:43:56+00:00

Hi,

I am using VS2022 community edition and created a new Http Azure function with run time as .Net 7.0.

 <PropertyGroup>
   <TargetFramework>net7.0</TargetFramework>
   <AzureFunctionsVersion>v4</AzureFunctionsVersion>
 </PropertyGroup>

When I reffered, "Microsoft.Extensions.Logging.Abstractions" (8.00-preview.7.23375.6 or 7.0.1) and debug, I am getting an error

Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

I googled a lot, but could not find the answer.

What can be the issue and how to fix this.

Regards,

Viswanath

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,181 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,964 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.