paint-brush
10-Day .Net Aspire Challenge: Day 1 - An Introduction to .Net Aspire by@ssukhpinder
200 reads

10-Day .Net Aspire Challenge: Day 1 - An Introduction to .Net Aspire

by Sukhpinder SinghAugust 29th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Step-by-step guide on how to use the .Net Aspire framework in Visual Studio. The framework is used to develop cloud and production-ready distributed applications. It consists of components to handle cloud-native concerns such as Redis, Postgres etc.
featured image - 10-Day .Net Aspire Challenge: Day 1 - An Introduction to .Net Aspire
Sukhpinder Singh HackerNoon profile picture
Step-by-step guide on how to use the .Net Aspire framework in Visual Studio.

Introduction

.Net Aspire framework is used to develop cloud and production-ready distributed applications. It consists of components to handle cloud-native concerns such as Redis, Postgres, etc.

Prerequisites

  • Install .Net 8 
  • Install version 17 or higher
  • .Net Aspire Workload
  • Container runtime such as

Objectives

  • Learn how to create a starter project using .Net Aspire templates.

Getting Started

Step 1: Open Visual Studio

Open Visual Studio, and then select “.Net Aspire Starter App” as shown below.



Step 2: Provide the Project Name

Provide the project name and project directory.



Step 3: Select Frameworks

The next step is to select the applicable frameworks, and check “Configure for https”.


Note: Select “Use Redis for caching” only if the docker container is up and running.



And finally, click the “Create” button at the bottom.

Step 4: Understand the Solution Structure

The solution consists of 4 different projects as follows [If a test project is selected then an additional test project will be available]
  • DotnetAspireChallenge.ApiService: An Web API project is used to provide data for the web application.
  • DotnetAspireChallenge.AppHost: An orchestrator project to connect and configure multiple projects and services.
  • DotnetAspireChallenge.ServiceDefaults: A shared configuration manager for all of your projects and services.
  • DotnetAspireChallenge.Web: A blazer web application that connects with “DotnetAspireChallenge.ApiService” to fetch data.



Step 5: Run the Project

Set “DotnetAspireChallenge.AppHost” as the startup project, and run the project as shown below.




Congratulations..!! You’ve created your first .Net Aspire project.

Github Project

C# Programming🚀

Thank you for being a part of the C# community! Before you leave:

Follow us: | | |


Visit our other platforms: More content at

바카라사이트 바카라사이트 온라인바카라