The specified framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found

Asked

Viewed 801 times

-1

Hello

I have the following app on . net:

inserir a descrição da imagem aqui

I’m trying to dockerize the project.

I have the following dockerfile:

inserir a descrição da imagem aqui

And the Docker-Compose.yml:

inserir a descrição da imagem aqui

And my version of dotnet is 3.1:

inserir a descrição da imagem aqui

When I execute the command Docker-Compose up the following error is returned:

inserir a descrição da imagem aqui

Any idea what it might be?

Thank you.

  • Can add Todoapp.csproj to the question?

1 answer

1


The problem is not with Docker, but with switching to . net core 3.1. Check that TodoApp.csproj is with . net 2.* or 3.*. If the project has a . net other than the version of the container image used, adjust them to have the same version (beware that the name of the images varies according to the version of . net).

If you’re always with . net 3.*, be sure to remove any reference to the meta package Microsoft.AspNetCore.App. More about this change: https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.1&tabs=visual-studio#remove-obsolete-package-References

Browser other questions tagged

You are not signed in. Login or sign up in order to post.