Aspire use its own build configuration name for the project resources
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
I have a multi-product solution and use .NET Aspire to setup all projects and their dependencies.
To speed-up the launch when working on a specific project, I created 3 different build configuration at the solution & Aspire project level:
1. `Debug` to run all projects/products,
2. `Debug_Product1` to run Product1 and its dependencies (including a project that is a customer portal that serve as authentication server),
3. `Debug_Product2` to run Product2 and its dependencies (including a project that is a customer portal that serve as authentication server),*
In the Aspire host project, each configuration define build constants that allow me define and include only the required resource (via `#if` directives).
When I run the host using the solution using the `Debug_Product1` build configuration, the Aspire host try to run the projects by run the executable present in the folder `/ProjectName/bin/Debug_Product1/` instead of `/ProjectName/bin/Debug/` (`Debug_Product1` is only defined in the Aspire host project to conditionally define the different ressources).
Is there a way to tell Aspire what is the name of the build configuration of the different project ressource?
### Expected Behavior
The host should use the build configuration of the project that is configured by the configuration manager of the solution
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version info
SDK .NET :
Version: 9.0.300
Commit: 15606fe0a8
Workload version: 9.0.300-manifests.af4147de
MSBuild version: 17.14.5+edd3bbf37
Environnement d'exécution :
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.300\
Charges de travail .NET installées :
[wasm-tools-net8]
Source de l’installation: VS 17.14.36202.13
Version de manifeste: 9.0.5/9.0.100
Chemin d'accès au Manifeste: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.workload.mono.toolchain.net8\9.0.5\WorkloadManifest.json
Type d'installation: Msi
[wasm-tools]
Source de l’installation: VS 17.14.36202.13
Version de manifeste: 9.0.5/9.0.100
Chemin d'accès au Manifeste: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.workload.mono.toolchain.current\9.0.5\WorkloadManifest.json
Type d'installation: Msi
[aspire]
Source de l’installation: VS 17.14.36202.13
Version de manifeste: 8.2.2/8.0.100
Chemin d'accès au Manifeste: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Type d'installation: Msi
Configuré pour utiliser loose manifests lors de l’installation de nouveaux manifestes.
Host:
Version: 9.0.5
Architecture: x64
Commit: e36e4d1a8f
.NET SDKs installed:
8.0.410 [C:\Program Files\dotnet\sdk]
9.0.204 [C:\Program Files\dotnet\sdk]
9.0.300 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.