Yellow triangle over Frameworks\Microsoft.AspNetCore.App

Viewed 1027

I'm using VS2019 Pro v16.3.5. I have installed the .Net Core 3.0 SDK.

I have an Azure Durable Functions C# project that makes use of Microsoft.Extensions.Logging.Abstractions v3.0.0.0

This assembly is contained within the shared framework Microsoft.AspNetCore.App. So, I've added a reference to this from my csproj file, as seen below:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <AzureFunctionsVersion>v3-preview</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />

Trouble is VS seems to have difficulty resolving this. In Solution Explorer, for my project, I get a yellow triangle over Dependencies\Frameworks\Microsoft.AspNetCore.App:

frameworks pic

I also get the following compilation error:

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

1 Answers

I also had this issue after migrating to VS2019/netcore3.0

During migration I had to add a FrameworkReference to Microsoft.AspNetCore.App, just like Ruard pointed out.

In my case the solution was to :

  1. close the solution
  2. delete all bin/obj folder
  3. (most important) delete the .vs folder.

Hope this will solve your problem as well.

Related