no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier browser-wasm

Error: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier ‘browser-wasm’. xxxxxxxxxxxx C:\Program Files\dotnet\sdk\7.0.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets Fix: Was able to resolve the issue by removing the project dependency (which I didn’t need in the first place, but accidentally got placed there). In my case, the error wasn’t the result of the Blazor project itself, but a referenced... » read more

ASP.NET Core 7.0 Documentation

ASP.NET Core 7.0 https://learn.microsoft.com/en-us/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-7.0 ASP.NET Core Blazor https://learn.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-7.0

Convert Blazor App from .NET 5 to .NET 6/7

To update to a new version of Blazor WebAssembly, you need to follow 4 steps: Change the target framework. Upgrade NuGet packages. Add HeadOutlet to Program.cs. Modify Blazor “Server” App Change the target framework The first step to update Blazor WebAssembly to a newer version is updating the target framework. Right click to your project, select Properties. Select .NET... » read more

Install .NET 6 Entity Framework

Install the following packages from Nuget Package Manager… Microsoft.EntityFrameworkCore Microsoft.EntityFrameworkCore.Design Microsoft.EntityFrameworkCore.SqlServer Install Entity Framework.. Check to see if Entity Framework is installed You will get the following if EF is not installed… dotnet : Could not execute because the specified command or file was not found. At line:1 char:1 + dotnet ef + ~~~~~~~~~ +... » read more

ASP.NET 6 Web API

Create New Project Template: ASP.NET Core Web API Framework: .NET 6.0 Check “Configure for HTTPS“ Check “Use controllers (uncheck to use minimal API)” for controller vs minimal API Check “Enable OpenAPI support” for Swagger OpenAPI support Book Class Book Controller or … For Delete, pass in object instead of id. BookController using Entity Framework Example:

CRUD with a .NET 6 Web API & Entity Framework Core Example

Visual Studio 2022 New Project Template: ASP.NET Core Web API Framework: .NET 6.0 Check “Configure for HTTPS“ Check “Use controllers (uncheck to use minimal API)” for controller vs minimal API Check “Enable OpenAPI support” for Swagger OpenAPI support Entity Framework Install the following from Nuget Package Manager… Microsoft.EntityFrameworkCore Microsoft.EntityFrameworkCore.Design Microsoft.EntityFrameworkCore.SqlServer PM> dotnet tool install –global... » read more

Minimal APIs Demo using .NET6 , EFCore6 and Sql Server

Article: https://medium.com/geekculture/minimal-apis-in-net-6-a-complete-guide-beginners-advanced-fd64f4da07f5 Source Code Example: https://github.com/csehammad/MinimalAPIDemo/ Live Example: https://minimalapidemo.azurewebsites.net/swagger/index.html DB Script: Create a new database and run the script located at /DB/AuthorsDB_Script.sql Live Demo: https://minimalapidemo.azurewebsites.net/swagger/index.html This project demonstrates the following: How to create a CRUD APIs in .NET6 using Minimal APIS. How to add OpenAPI Specifications using Swagger How to Secure Minimal APIs using JWT Authentication