efcore: System.TypeLoadException: Could not load type 'System.Diagnostics.CodeAnalysis.MaybeNullAttribute' from assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

Maybe U ve reopen this issue. https://github.com/aspnet/EntityFrameworkCore/issues/17081 I have Same problem with Microsoft.EntityFrameworkCore" Version="3.0.0-preview9.19423.6

image

this my project file


<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>


  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0-preview9.19424.4" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0-preview9.19423.6" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0-preview9.19423.6" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc2" />
  </ItemGroup>


  <ItemGroup>
    <ProjectReference Include="..\EntityCodeGen\EntityCodeGen.csproj" />
  </ItemGroup>

</Project>

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

@Diaskhan correct. Before we closed #17081 we found that a more recent SDK was needed because of the changes to the attributes. Please confirm if after upgrading to the Preview 9 SDK you still see the problem.

Thanks for confirming @Diaskhan!

Xamarin.Android 10.0.99.100 has the same issue. Can you please reopen this issue and if possible create a new Xamarin.Android version where this works? @divega do you know if there is a workaround in the meantime? (other than downgrading again)

Edit: Xamarin.Android 10.0.0.43 is broken as well