From 0a43b1d7e81cbf81b5f2d35ff8e07e85c830174a Mon Sep 17 00:00:00 2001 From: "Tizian.Breuch" Date: Fri, 8 Aug 2025 16:16:43 +0200 Subject: [PATCH] WebRootPath --- Webshop.Api/Program.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Webshop.Api/Program.cs b/Webshop.Api/Program.cs index 0ef448b..01f3088 100644 --- a/Webshop.Api/Program.cs +++ b/Webshop.Api/Program.cs @@ -25,9 +25,13 @@ using Webshop.Infrastructure.Data; using Webshop.Infrastructure.Repositories; using Webshop.Infrastructure.Services; -var builder = WebApplication.CreateBuilder(args); - -builder.WebHost.UseWebRoot("wwwroot"); +var options = new WebApplicationOptions +{ + Args = args, + // Diese Zeile setzt den WebRootPath explizit auf den wwwroot-Ordner. + WebRootPath = "wwwroot" +}; +var builder = WebApplication.CreateBuilder(options); // --- 1. Dependency Injection Konfiguration ---