Florian van Dillen
banner
florianvandillen.nl
Florian van Dillen
@florianvandillen.nl
Developer and Cloud solution architect @ 4Dotnet
When you find some @daprdev.bsky.social containers from two centuries ago 😊

(This is actually a known Docker CLI issue)
November 3, 2025 at 10:54 AM
Some cool new stuff in @jetbrains.com Rider added in the latest update!
September 22, 2025 at 1:49 PM
Dag Easypark! Gebruik de @anwbverkeer.bsky.social onderweg app wel.
March 31, 2025 at 2:19 PM
Wanneer ga jij eerlijk toegeven dat je hier enkel bent om dit soort nepreacties te plaatsen?
December 10, 2024 at 10:32 AM
As soon as we make this change, our AppHost stops complaining! Our AppHost can find the constant class and is now able to use its values. Thanks to this, changes to the values now only have to be made in one place and we can completely eliminate magic strings from our orchestration.
November 30, 2024 at 6:03 PM
Luckily, the fix is easy. We open up the AppHost .csproj file and make an edit to the projectreference to the constants project.
November 30, 2024 at 6:03 PM
When we add this class library as a project dependency to our AppHost project, that works well. Until we actually try to use the constants! Whoops!
November 30, 2024 at 6:03 PM
We create a simple class library with a constants class that contains some static strings with our values.
November 30, 2024 at 6:03 PM
In the project that consumes the database, we now use an extension method provided by the Aspire.Microsoft.EntityFrameworkCore.SqlServer NuGet package. Note that we need the name of the SQL database resource created earlier.

The code sets up our EF Core DbContext with the connection string.
November 30, 2024 at 6:03 PM
When we run the AppHost, you can see the connection string being provided to the running project (which is just an ASP.NET Core web API).
November 30, 2024 at 6:03 PM
We can reference the SQL Server database using the .WithReference(sql) method. This injects the connection string to the database into the environment variables of the service.
November 30, 2024 at 6:03 PM
Other dependencies, such as a SQL Server database, can be defined in code.
November 30, 2024 at 6:03 PM
When creating your AppHost in Aspire, you can create resources from your projects by adding the projects as a dependency to your AppHost.
November 30, 2024 at 6:03 PM