.NET reference application shown at .NET Conf featuring ASP.NET Core, Blazor, .NET MAUI, Microservices, Orleans, Playwright, and more!
Перейти к файлу
Jonathan Peppers 9cae3c9343
[net8.0] fix C# compiler error involving `x:Name` (#242)
Context: https://github.com/dotnet/maui/pull/5611
Fixes: https://github.com/microsoft/dotnet-podcasts/issues/239

The `net8.0` branch currently fails to build with:

    src/Mobile/Controls/Player.xaml.cs(54,9): error CS0103: The name 'podcastImage' does not exist in the current context
    src/Mobile/Controls/Player.xaml.cs(55,9): error CS0103: The name 'duration' does not exist in the current context

We think that `x:Name` in .NET 8 appropriately "skips" emitting fields
when used in combination with `<OnPlatform/>`.

We can condition the C# code accessing these fields with `#if`.

Secondly, there are also a lot places using `<On Platform="UWP, macOS">`, we need
to change these to:

* `macOS` -> `MacCatalyst`

Lastly, use .NET 8 RC 2 released bits. We shouldn't need to be using nightly builds in this repo.
2023-10-23 11:11:13 -05:00
.github/workflows [net8.0] fix C# compiler error involving `x:Name` (#242) 2023-10-23 11:11:13 -05:00
deploy Add files via upload 2022-01-24 06:51:52 -08:00
docs Update Readme.md 2021-12-03 09:36:11 -08:00
src [net8.0] fix C# compiler error involving `x:Name` (#242) 2023-10-23 11:11:13 -05:00
.dockerignore Initial commit 2021-11-29 11:54:48 -08:00
.gitignore Initial commit 2021-11-29 11:54:48 -08:00
CODE_OF_CONDUCT (2).md Initial commit 2021-11-29 11:54:48 -08:00
CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md committed 2021-11-10 08:42:27 -08:00
Deploy-websites-services.md Update Deploy-websites-services.md 2021-12-10 12:47:58 -08:00
Directory.build.props Build for p13 2022-02-15 12:30:22 -05:00
LICENSE LICENSE committed 2021-11-10 08:42:27 -08:00
NetPodcast.Services.sln Initial commit 2021-11-29 11:54:48 -08:00
NuGet.config [net8.0] fix C# compiler error involving `x:Name` (#242) 2023-10-23 11:11:13 -05:00
Podcast.Web.sln Initial commit 2021-11-29 11:54:48 -08:00
README.md Update README.md 2021-12-01 09:44:54 -08:00
SECURITY.md SECURITY.md committed 2021-11-10 08:42:29 -08:00
SUPPORT.md SUPPORT.md committed 2021-11-10 08:42:29 -08:00
docker-compose.override.yml Initial commit 2021-11-29 11:54:48 -08:00
docker-compose.yml Make adjustments to retry creating the database 2022-03-02 09:14:34 -08:00

README.md

.NET Podcasts - Sample Application

We are happy to announce the release of .NET Podcast App: a sample application showcasing .NET 6, ASP.NET Core, Blazor, .NET MAUI, Azure Container Apps, and more.

You can browse a live running version of the .NET Podcasts app powered by ASP.NET Core and Blazor.

Logo

Build Status

Project Status
Website Build status
Web API Services Build status
Listen Together Hub Services Build status

Application Architecture Diagram

.NET Podcast Application Diagram

Repositories

For this sample application, we build an app to listen all you favorite .NET podcasts for all the ecosystems: Web, Android, iOS, macOS and Windows. You can find the different apps separated by folders in this repo:

  • Mobile & Desktop: Native .NET MAUI Application for iOS, Android, macOS, and Windows
  • Website: Blazor WebAssembly app and ASP.NET Core Razor Marketing website
  • Backend API: ASP.NET Core Web APIs & Minimal APIs, injestion worker, and podcast update worker
  • Blazor Hybrid App: Sample hybrid application of .NET MAUI with Blazor.

Full Deployment with GitHub Actions

dotnet-podcasts repo is configured to deploy all services and websites automatically to Azure using GitHub Actions. Follow the detailed guidelines to setup GitHub Actions on your fork.

Local Deployment Quickstart

The easiest way to get started is to build and run the .NET Podcasts app service, database, and storage using Docker.

  1. First install Docker Desktop
  2. Clone the repository and navigate to the root directory in a terminal
  3. Run the following docker command (this may take some time to pull images, build, and deploy locally)
docker-compose up

This will deploy and start all services required to run the web, mobile, and desktop apps. The Web API will run on localhost:5000 and the SignalR Hub for listen together will run on localhost:5001.

Web, Mobile, & Desktop

The apps are configured to speak to localhost on the correct ports for each service. Simply open the Web solution or the .NET MAUI solution and run the app.

Ensure that you have the following services running in Docker (podcast.api, listentogether.hub, podcast.updater.worker, podcast.db, storage):

Configured Docker services

Backend Services

Open the Services solution and pick a service to run locally such as the Podcast.API.

Ensure that the following services are running in Docker, note that you only need the podcast.db and storage:

Configured Docker services

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.