Skip to content

builder.AddProject<Projects.SampleMAUI>("app_maui"))- or any other client project #876

@moljac

Description

@moljac

Hi

I think from title should be clear what I am attempting to achieve.

Working on templates for MAUI repro samples and playing with Aspire. Being lazy bum (dev) I would like to use Aspire for service discovery for client apps (MAUI, console, desktop...).

Repro:

SampleAspireStarter.zip

CLI

 dotnet build ./SampleAspireStarter/SampleAspireStarter.AppHost/SampleAspireStarter.AppHost.csproj

Error I get is:

./SampleAspireStarter.AppHost/SampleAspireStarter.AppHost.csproj : error NU1201: Project SampleMAUI is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Project SampleMAUI supports:
./SampleAspireStarter.AppHost/SampleAspireStarter.AppHost.csproj : error NU1201:   - net8.0-android34.0 (.NETCoreApp,Version=v8.0)
./SampleAspireStarter.AppHost/SampleAspireStarter.AppHost.csproj : error NU1201:   - net8.0-ios17.0 (.NETCoreApp,Version=v8.0)
./SampleAspireStarter.AppHost/SampleAspireStarter.AppHost.csproj : error NU1201:   - net8.0-maccatalyst17.0 (.NETCoreApp,Version=v8.0)

Seems like MauiAppBuilder should implement IDistributedApplicationBuilder

public static IResourceBuilder<ProjectResource> AddProject<TProject>(this IDistributedApplicationBuilder builder, string name) where TProject : IServiceMetadata, new()

MauiAppBuilder

https://github.com/dotnet/maui/blob/c5f3528e48055d3f75f98bf9037220132b56725e/src/Core/src/Hosting/MauiAppBuilder.cs

Am I on the right track?

Being able to add any client to Aspire would be really nice feature for not-only-web-distributed-app development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions