MVFC.Aspire.Helpers.CloudStorage
7.3.3
dotnet add package MVFC.Aspire.Helpers.CloudStorage --version 7.3.3
NuGet\Install-Package MVFC.Aspire.Helpers.CloudStorage -Version 7.3.3
<PackageReference Include="MVFC.Aspire.Helpers.CloudStorage" Version="7.3.3" />
<PackageVersion Include="MVFC.Aspire.Helpers.CloudStorage" Version="7.3.3" />
<PackageReference Include="MVFC.Aspire.Helpers.CloudStorage" />
paket add MVFC.Aspire.Helpers.CloudStorage --version 7.3.3
#r "nuget: MVFC.Aspire.Helpers.CloudStorage, 7.3.3"
#:package MVFC.Aspire.Helpers.CloudStorage@7.3.3
#addin nuget:?package=MVFC.Aspire.Helpers.CloudStorage&version=7.3.3
#tool nuget:?package=MVFC.Aspire.Helpers.CloudStorage&version=7.3.3
MVFC.Aspire.Helpers.CloudStorage
Helpers for integrating with Google Cloud Storage (GCS emulator) in .NET Aspire projects.
Motivation
When you need object storage locally, you usually:
- Spin up a GCS/S3‑compatible emulator by hand.
- Mount folders manually as bucket data.
- Hard‑code emulator URLs and ports in your services.
With .NET Aspire you can define the container, but you still need to:
- Keep the emulator configuration aligned with your applications.
- Remember which folder is mounted for which bucket.
- Inject the emulator host/port into your projects.
MVFC.Aspire.Helpers.CloudStorage provides:
AddCloudStorage(...)to start the GCS emulator.WithBucketFolder(...)to mount a local folder as data.WithReference(...)to injectSTORAGE_EMULATOR_HOSTinto your project.
Overview
This project facilitates the configuration and integration of the Google Cloud Storage emulator in distributed .NET Aspire applications, providing extension methods to:
- Add and integrate the GCS emulator.
- Allow optional persistence of buckets via bind mount.
Project Structure
MVFC.Aspire.Helpers.CloudStorage: Helpers and extensions library for Cloud Storage.
Features
- Adds the GCS emulator to the AppHost.
- Allows bucket persistence configuration via a local folder.
- Extension methods to facilitate AppHost configuration.
- Exposes emulator functionalities on port
4443.
Compatible Images:
fsouza/fake-gcs-server
Installation
dotnet add package MVFC.Aspire.Helpers.CloudStorage
Quick Aspire usage (AppHost)
using Aspire.Hosting;
using MVFC.Aspire.Helpers.CloudStorage;
var builder = DistributedApplication.CreateBuilder(args);
var cloudStorage = builder.AddCloudStorage("cloud-storage")
.WithBucketFolder("./bucket-data");
builder.AddProject<Projects.MVFC_Aspire_Helpers_Playground_Api>("api-example")
.WithReference(cloudStorage)
.WaitFor(cloudStorage);
await builder.Build().RunAsync();
Provisioning diagram
sequenceDiagram
participant Aspire as .NET Aspire
participant Container as GCP Storage Emulator
participant Configurator as Cloud Storage Processor
Aspire->>Container: Start container (fsouza/fake-gcs-server)
Container-->>Aspire: Ready (port 4443 available)
Aspire->>Configurator: Trigger OnResourceReady
Configurator->>Container: Create Buckets
Configurator-->>Aspire: Provisioning Completed
Aspire->>App: Start App with STORAGE_EMULATOR_HOST
Fluent methods
| Method | Description |
|---|---|
WithDockerImage(image, tag) |
Overrides the Docker image used. |
WithBucketFolder(localPath) |
Configures a bind mount from a local folder to persist buckets. |
AddCloudStorage parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
string | — | Resource name. |
port |
int | 4443 |
Emulator port. |
Mounting a bucket from folders
It is possible to mount a GCS emulator bucket using a local folder for data persistence. The specified folder will be used by the emulator as persistent storage for the buckets. Ensure the folder exists and has read/write permissions.
Example folder structure
graph TD
A["./bucket-data"]
B["my-bucket"]
C["object1.txt"]
D["object2.json"]
A --> B
B --> C
B --> D
Emulator endpoints
- List buckets:
http://localhost:4443/storage/v1/b - List objects in a bucket:
http://localhost:4443/storage/v1/b/{bucket-name}/o
Environment variable injected
The WithReference method automatically injects:
STORAGE_EMULATOR_HOST– emulator address for your application.
Requirements
- .NET 9+
- Aspire.Hosting >= 9.5.0
License
Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Aspire.Hosting (>= 13.1.2)
-
net9.0
- Aspire.Hosting (>= 13.1.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MVFC.Aspire.Helpers.CloudStorage:
| Package | Downloads |
|---|---|
|
MVFC.Aspire.Helpers.Mongo
Helpers para integração com MongoDB em projetos .NET Aspire, incluindo suporte a Replica Set e inicialização automática. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.3.3 | 0 | 3/31/2026 |
| 7.3.2 | 39 | 3/30/2026 |
| 7.3.1 | 40 | 3/30/2026 |
| 7.3.0 | 41 | 3/30/2026 |
| 7.2.2 | 41 | 3/29/2026 |
| 7.2.1 | 43 | 3/29/2026 |
| 7.2.0 | 38 | 3/29/2026 |
| 7.1.0 | 96 | 3/22/2026 |
| 6.4.4 | 93 | 3/21/2026 |
| 6.4.3 | 100 | 3/15/2026 |
| 6.4.2 | 103 | 3/15/2026 |
| 6.4.1 | 96 | 3/10/2026 |
| 6.4.0 | 93 | 3/9/2026 |
| 6.3.0 | 98 | 3/8/2026 |
| 6.2.0 | 95 | 3/8/2026 |
| 6.1.1 | 91 | 3/7/2026 |
| 6.0.0 | 97 | 3/7/2026 |
| 5.1.0 | 104 | 2/28/2026 |
| 5.0.3 | 107 | 2/17/2026 |
| 5.0.2 | 106 | 2/17/2026 |