From f8ad3b297054b021358eb6d410dba61e5cc8d3f4 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Sun, 24 Apr 2022 22:20:35 -0500 Subject: [PATCH] wwwroot is now extracted on run. --- Props/Program.cs | 11 +++--- Props/Props.csproj | 43 ++++++----------------- Props/Services/Textual/ITextualManager.cs | 1 + Props/Startup.cs | 1 + 4 files changed, 17 insertions(+), 39 deletions(-) diff --git a/Props/Program.cs b/Props/Program.cs index 937115a..16eb316 100644 --- a/Props/Program.cs +++ b/Props/Program.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; +using System.IO; +using System; +using System.Reflection; namespace Props { @@ -20,7 +17,7 @@ namespace Props Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { - webBuilder.UseStartup(); + webBuilder.UseWebRoot(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "wwwroot/")).UseStartup(); }); } } diff --git a/Props/Props.csproj b/Props/Props.csproj index 73c7ee4..40697d0 100644 --- a/Props/Props.csproj +++ b/Props/Props.csproj @@ -1,16 +1,16 @@ - net6.0 true - true true false linux-x64 - true + true + + true aspnet-Props-20A2A991-EC61-4C06-91D2-953482026A7B @@ -51,39 +51,20 @@ - - - - false - - - - - - - - - - - - - - - - - - - - - - + + + PreserveNewest + + + + - + @@ -113,6 +94,4 @@ - - \ No newline at end of file diff --git a/Props/Services/Textual/ITextualManager.cs b/Props/Services/Textual/ITextualManager.cs index 172fa79..7005827 100644 --- a/Props/Services/Textual/ITextualManager.cs +++ b/Props/Services/Textual/ITextualManager.cs @@ -2,6 +2,7 @@ namespace Props.Services.Content { public interface ITextualManager { + // TODO: Replace this system with globalization and localization. See: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-6.0 dynamic Json { get; } } } \ No newline at end of file diff --git a/Props/Startup.cs b/Props/Startup.cs index 5b7d2b0..0c4d6f8 100644 --- a/Props/Startup.cs +++ b/Props/Startup.cs @@ -8,6 +8,7 @@ using Props.Data; using Props.Models.User; using Props.Services.Content; using Props.Services.Modules; +using System; namespace Props {