Thank you for you reply,
MeanWhile I have created a new project using he angular and asp net core template and updated angularto version 13
But i still like to figure this out in case i need to add an already exisitng angular project
I have changed the debug to IIS express
when I go to the url i dont see anyhing it just rederects to LocalHost/(sslPort)
I use asp net core 6 here is the program.cs
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.SpaServices.AngularCli;
using Microsoft.EntityFrameworkCore;
using Restaurant.Data;
using Restaurant.Model;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("Database")));
builder.Services.AddIdentity<ApplicationUser, ApplicationRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
builder.Services.AddControllers();
builder.Services.AddSpaStaticFiles(configuration =>
configuration.RootPath = "ClientApp/dist");
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApp";
if (app.Environment.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "start");
}
});
app.Run();