Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does this mean and how can it be resolved properly? Package 'Microsoft.AspNet.Mvc 5.2.8' was restored using '...' instead of the project target framework 'net8.0'. This package may not be fully compatible with your project. #35184

Open
myyandar opened this issue Nov 23, 2024 · 6 comments

Comments

@myyandar
Copy link

What does this mean and how can it be resolved properly?

Package 'Microsoft.AspNet.Mvc 5.2.8' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net8.0'. This package may not be fully compatible with your project.

EF Core version:
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 8.0
Operating system:
IDE: Visual Studio 2022 17.12.1

This is not a coding issue.

@ErikEJ
Copy link
Contributor

ErikEJ commented Nov 23, 2024

You have a reference to an old ASP.NET dll (.NET Framework) - please share a full repro.

What does this have to do with EF Core?

@myyandar
Copy link
Author

The problem has been there since the very first time I updated packages. Perhaps my project file may give indications:

net8.0 enable enable aspnet-IssWeb-96ac3037-0def-4d49-b7a7-f3bd94d2fc41 all runtime; build; native; contentfiles; analyzers; buildtransitive

@myyandar
Copy link
Author

Image

@myyandar
Copy link
Author

Please guide me through updating the "old.dll" you mentioned to a .Net 8 MVC web application-compatible one.

@ErikEJ
Copy link
Contributor

ErikEJ commented Nov 23, 2024

You need to format you project file as code, no one can read it here.

@myyandar
Copy link
Author

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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <UserSecretsId>aspnet-IssWeb-96ac3037-0def-4d49-b7a7-f3bd94d2fc41</UserSecretsId>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Azure.Identity" Version="1.11.4" />
    <PackageReference Include="MailKit" Version="4.8.0" />
    <PackageReference Include="Microsoft.AspNet.Mvc" Version="5.3.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Facebook" Version="8.0.10" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.10" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.10" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="8.0.10" />
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.10" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.10" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.10" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.10" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.10">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.1" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.7" />
    <PackageReference Include="MimeKit" Version="4.8.0" />
    <PackageReference Include="PayPalCheckoutSdk.DotNet7" Version="1.0.5" />
    <PackageReference Include="Stripe.net" Version="47.1.0-beta.3" />
    <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.1" />
    <PackageReference Include="System.Text.Json" Version="9.0.0" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Areas\Admin\Data\" />
    <Folder Include="Areas\Admin\Models\" />
  </ItemGroup>

  <ItemGroup>
    <None Include="wwwroot\Templates\EmailTemplate.html" />
  </ItemGroup>

</Project>
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants