Skip to main content

Posts

Delay new NuGet package versions with minimum package publish age

Most supply chain attacks on package ecosystems follow the same pattern: a malicious version gets published, and people pick it up within hours because their tooling always grabs the latest version. The window between "published" and "discovered and removed" is where the damage happens. NuGet now has an opt-in feature that targets exactly that window: minimum package publish age . Note: this feature requires NuGet 8.0, .NET SDK 11.0.100 or Visual Studio 18.12. What does it do? You configure a waiting period per package source. When dotnet package add or dotnet package update needs to pick the latest version for you, it skips versions that are younger than that period. That gives the community (and the package owner) time to spot a bad release before you adopt it. Because the age is set per source, you can delay packages from nuget.org without slowing down packages from your internal feed. Remark: the delay doesn't guarantee a package is safe. It ...
Recent posts

Bending Aspire to your will - Build a custom resource (Part 2)

In the previous part I defined ScalarResource and the OpenApiAnnotation , and services can opt in with WithOpenApi() . All data, no behaviour. Now I make Scalar actually start, find the documents, and tell the dashboard what it found. Note: this post is part of a series about the demos from my session “Bending Aspire to your will” . AddScalar: the behaviour lives in the extension method public static IResourceBuilder<ScalarResource> AddScalar( this IDistributedApplicationBuilder builder, string name = "scalar", int? port = null) { ArgumentNullException.ThrowIfNull(builder); var existing = builder.Resources.OfType<ScalarResource>().SingleOrDefault(); if (existing is not null) { return builder.CreateResourceBuilder(existing); } builder.Services.TryAddEventingSubscriber<ScalarEndpointLogger>(); var scalar = new ScalarResource(name); return builder.AddResource(scalar) .WithImage("scalara...

Bending Aspire to your will - Build a custom resource (Part 1)

I spend a lot of time testing and debugging APIs, and so do my AI agents. Lately I notice that my agents lose time and tokens on it. They look for the right port, guess at endpoints, fight with a terminal, and try to get the database back into a known state. Every run starts with the same detective work. So for this series of posts I picked one scenario and I’m sticking with it: the API-testing loop . The goal is to adapt Aspire so that I (and my agents) can debug and test easily and efficiently. Note: this post is part of a series about the demos from my session “Bending Aspire to your will” . Every API in my AppHost has its own OpenAPI document, and every API can have its own UI. I want one API reference for the whole graph. Scalar runs as a container, so it fits in Aspire as a resource. The question is how you build a custom resource that feels like it belongs there. The naive way is a Scalar container with a hand-written list of API URLs. It works, but it is one more list...

Bending Aspire to your will - Reset your application state with one command

I spend a lot of time testing and debugging APIs, and so do my AI agents. Lately I notice that my agents lose time and tokens on it. They look for the right port, guess at endpoints, fight with a terminal, and try to get the database back into a known state. Every run starts with the same detective work. So for this series of posts I picked one scenario and I’m sticking with it: the API-testing loop . The goal is to adapt Aspire so that I (and my agents) can debug and test easily and efficiently. The third step of my API-testing loop: tests leave data behind. A clean, repeatable run means flushing Redis and recreating the catalog database. By hand, that is a Redis CLI command and a database drop-and-seed, in the right order. For me that's annoying. For an agent, it's one more thing to figure out on every run. Note: this post is part of a series about the demos from my session “Bending Aspire to your will” . In aspire-shop , state lives in two places: the PostgreSQL cat...

Bending Aspire to your will - Run a test call from the dashboard, the CLI and your agent

I spend a lot of time testing and debugging APIs, and so do my AI agents. Lately I notice that my agents lose time and tokens on it. They look for the right port, guess at endpoints, fight with a terminal, and try to get the database back into a known state. Every run starts with the same detective work. So for this series of posts I picked one scenario and I’m sticking with it: the API-testing loop . The goal is to adapt Aspire so that I (and my agents) can debug and test easily and efficiently. Part 1 gave me an export button for the OpenAPI spec. Now the next step in the loop: firing a test call at an endpoint. To check one endpoint I open a REST client, look up the port and type the URL. Again. My agents do the same, only they pay for it in tokens. Note: this post is part of a series about the demos from my session “Bending Aspire to your will” . The test call I want to make is simple: retrieve the products of the catalog service for a given brand. The endpoint is /api/v1/...

Bending Aspire to your will - Custom icons, URLs and a command to export your OpenAPI spec

I spend a lot of time testing and debugging APIs, and so do my AI agents. Lately I notice that my agents lose time and tokens on it. They look for the right port, guess at endpoints, fight with a terminal, and try to get the database back into a known state. Every run starts with the same detective work. So for this series of posts I picked one scenario and I’m sticking with it: the API-testing loop . The goal is to adapt Aspire so that I (and my agents) can debug and test easily and efficiently. Note: this post is part of a series about the demos from my session “Bending Aspire to your will” . The app is the aspire-shop sample: a frontend, a catalog service, a basket service, a catalog DB manager, PostgreSQL and Redis. The loop I run by hand looks like this: Get the OpenAPI spec Fire a test call at an endpoint Reset the state for a repeatable run Browse and try the API in one place Out of the box, that means four tools and a handful of terminals. The goal i...

Visug XL 2026 - Bending Aspire to your will - Q&A

 After my Aspire talk I got multiple questions. Two of them deserve some further explanation.  How does Testcontainers relate to Aspire?  And do Dev Containers solve the same problem? Both involve containers, so the confusion is understandable. They solve different problems, though. How does Testcontainers relate to Aspire? Both tools start containers for your dependencies (a database, a message broker, a cache). The difference is when and for whom . Testcontainers is a library you call from your test code. It starts a container, waits until it’s ready, and throws it away when the test finishes. Aspire is an application model. In the AppHost you describe your services and their dependencies, and Aspire orchestrates them for your local dev loop, including service discovery, connection strings, telemetry and the dashboard. With Testcontainers , the test owns the infrastructure: var postgres = new PostgreSqlBuilder() .WithImage("postgres:16") .Build(); a...