Code Monkey home page Code Monkey logo

aspire-mobile's Introduction

.NET MAUI + .NET Aspire - Better Together

NuGet package

This project provides integration code necessary to use .NET MAUI (and other mobile clients) with .NET Aspire. It also includes a .NET MAUI + Aspire project template.

Creating a new MAUI+Aspire project

Current status: Please test using the CI NuGet feed below. Once a few of us have tested, I will publish to the public nuget.org feed.

[Optional] To use the latest CI built packages create a nuget.config file with contents below. Place it in a parent directory to the directory you use for testing.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="aspire-mobile" value="https://pkgs.dev.azure.com/bretjohn-public/aspire-mobile/_packaging/aspire-mobile/nuget/v3/index.json" />
  </packageSources>
</configuration>

Install the templates:

dotnet new install MauiAspire.ProjectTemplates

In Visual Studio: File / New Project / .NET MAUI App with Aspire / MyApp

or create a project from the CLI:

dotnet new maui-aspire -o MyApp

Usage

Launch MyApp.AppHost project to start any Aspire managed servies and the Aspire dashboard.

Launching AppHost the first time will also generate the AspireAppSettings.g.cs file in the MauiApp source directory. Normally Aspire passess configuration settings as environment variables when launching services/clients, but for MAUI apps (at least today) those settings are instead generated here and included in the app at build time.

Once AppHost is running, then launch the MyApp project to run the MAUI app itself. Hit the Load Weather button and you should see the MAUI app fetch weather data from the minimal API service running on your desktop, with activity across all services and the MAUI client itself tracked in the Aspire dashboard.

aspire-mobile's People

Contributors

bretjohnson avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.