Repository navigation
Labels
Area-ContainersRelated to dotnet SDK containers functionality
Description
Describe the bug
When attempting to use the SDK container build support in the .NET 11 previews, I get the error:
error CONTAINER1015: Unable to access the repository 'dotnet/runtime-deps' at tag '11.0.0-preview.2-noble-chiseled' in the registry ''. Please confirm that this name and tag are present in the registry.
This is due to the ubuntu codename changing for the .NET 11 images from noble to resolute.
To Reproduce
Trying an SDK container build using the ubuntu images was enough to trigger for me.
Here's a minimal single-file reproduction (Single-file-ized output of dotnet new webapiaot), you can trigger the issue by publishing this with dotnet publish ./Program.cs /t:PublishContainer
#:sdk Microsoft.NET.Sdk.Web
#:property ContainerRegistry=ghcr.io
#:property ContainerRepository=hwoodiwiss/ReproSdk53370
#:property EnableSdkContainerSupport=true
#:property PublishAot=true
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.Http.HttpResults;
var builder = WebApplication.CreateSlimBuilder(args);
builder.Services.ConfigureHttpJsonOptions(options =>
{
options.SerializerOptions.TypeInfoResolverChain.Insert(0, AppJsonSerializerContext.Default);
});
var app = builder.Build();
Todo[] sampleTodos =
[
new(1, "Walk the dog"),
new(2, "Do the dishes", DateOnly.FromDateTime(DateTime.Now)),
new(3, "Do the laundry", DateOnly.FromDateTime(DateTime.Now.AddDays(1))),
new(4, "Clean the bathroom"),
new(5, "Clean the car", DateOnly.FromDateTime(DateTime.Now.AddDays(2)))
];
var todosApi = app.MapGroup("/todos");
todosApi.MapGet("/", () => sampleTodos)
.WithName("GetTodos");
todosApi.MapGet("/{id}", Results<Ok<Todo>, NotFound> (int id) =>
sampleTodos.FirstOrDefault(a => a.Id == id) is { } todo
? TypedResults.Ok(todo)
: TypedResults.NotFound())
.WithName("GetTodoById");
app.Run();
public record Todo(int Id, string? Title, DateOnly? DueBy = null, bool IsComplete = false);
[JsonSerializable(typeof(Todo[]))]
internal partial class AppJsonSerializerContext : JsonSerializerContext;Further technical details
TBD, I'll need to run dotnet --info on the GHA runner that I saw the issue on.
Reacted by Martin Costello and Ali Yuksekkaya
Metadata
Metadata
Assignees
Labels
Area-ContainersRelated to dotnet SDK containers functionality
Type
Projects
- StatusShow more project fieldsDone
Activity
Fix Ubuntu codename resolution for .NET 11
feat: add support for .NET 11 GA (#5902)