-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Error restoring WebAPI project using .NET 9 #110201
Comments
Tagging subscribers to this area: @dotnet/area-meta |
@FraserElectronics do you have a |
The Dockerfile on the linked page might need to be updated. It has a line like this:
If you are using .NET 9, which it looks like you are, you should change the version numbers in the Dockerfile to 9.0 instead of 8.0. |
Side note: recent version of the SDK have build-pack-like capabilities (if not using that tool itself), so you probably don't need to write/maintain the dockerfile yourself. Unless you're doing something unusual, you probably want to do that instead. |
@julealgon No, there is no global.json file in my solution - do I need one? Thanks all for the help. Andy |
@FraserElectronics Nah you don't need one. I was just wondering if maybe that could be a reason why it was trying to use a different version of the SDK, because you can do stuff like that with a |
I have created a WebAPI on a Linux machine using:
I wish to host this API in a docker container so I have followed the instructions here: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/building-net-docker-images?view=aspnetcore-9.0
When I run
docker build -t myapp .
I get the error:If I list the installed sdk's with dotnet --list-sdks I get:
What am I missing?
Andy
The text was updated successfully, but these errors were encountered: