diff --git a/NET8Blazor/PhotinoNetApp/PhotinoNetApp.csproj b/NET8Blazor/PhotinoNetApp/PhotinoNetApp.csproj index cab4fe3..0411378 100644 --- a/NET8Blazor/PhotinoNetApp/PhotinoNetApp.csproj +++ b/NET8Blazor/PhotinoNetApp/PhotinoNetApp.csproj @@ -7,16 +7,9 @@ enable PhotinoNetApp PhotinoNetApp - true - true - osx-arm64 - true - true - false - @@ -26,9 +19,4 @@ - - - - - diff --git a/NET8Blazor/PhotinoNetApp/Program.cs b/NET8Blazor/PhotinoNetApp/Program.cs index 896dd0a..fc609bf 100644 --- a/NET8Blazor/PhotinoNetApp/Program.cs +++ b/NET8Blazor/PhotinoNetApp/Program.cs @@ -1,6 +1,4 @@ using System.Drawing; -using System.Reflection; -using Microsoft.Extensions.FileProviders; using PhotinoNET; using PhotinoNetApp.Components; @@ -8,30 +6,18 @@ var builder = WebApplication.CreateBuilder(); builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); -builder.Services.AddSingleton(new ManifestEmbeddedFileProvider(Assembly.GetAssembly(type: typeof(Program))!, "/", "Microsoft.Extensions.FileProviders.Embedded.Manifest.xml", DateTimeOffset.Now)); -// builder.WebHost.UseWebRoot("wwwroot"); +builder.WebHost.UseWebRoot("wwwroot"); builder.WebHost.UseStaticWebAssets(); builder.WebHost.UseUrls("http://localhost:5000"); var app = builder.Build(); -// app.UseStaticFiles(); -app.UseStaticFiles(new StaticFileOptions -{ - FileProvider = app.Services.GetService(), - // RequestPath = "/PhotinoNetApp", - ServeUnknownFileTypes = true, -}); - +app.UseStaticFiles(); app.UseAntiforgery(); app.MapRazorComponents() .AddInteractiveServerRenderMode(); -foreach (var file in Assembly.GetExecutingAssembly().GetManifestResourceNames()) - if (file.Contains("wwwroot")) - app.Logger.LogWarning($"Public file: {file}"); - using var webServerCancellation = new CancellationTokenSource(); var webServerTask = app.RunAsync(webServerCancellation.Token);