Fixed naming
This commit is contained in:
parent
34d024fd59
commit
7b3ac75543
@ -1,8 +1,8 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Run Photino Net" type="DotNetProject" factoryName=".NET Project">
|
<configuration default="false" name="Run Photino Net" type="DotNetProject" factoryName=".NET Project">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/PhotinoNetAbpp/bin/Debug/net8.0/PhotinoNetAbpp" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/PhotinoNetApp/bin/Debug/net8.0/PhotinoNetAbpp" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/PhotinoNetAbpp" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/PhotinoNetApp" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
<option name="USE_MONO" value="0" />
|
<option name="USE_MONO" value="0" />
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<base href="/"/>
|
<base href="/"/>
|
||||||
<link rel="stylesheet" href="bootstrap/bootstrap.min.css"/>
|
<link rel="stylesheet" href="bootstrap/bootstrap.min.css"/>
|
||||||
<link rel="stylesheet" href="app.css"/>
|
<link rel="stylesheet" href="app.css"/>
|
||||||
<link rel="stylesheet" href="PhotinoNetAbpp.styles.css"/>
|
<link rel="stylesheet" href="PhotinoNetApp.styles.css"/>
|
||||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||||
<HeadOutlet/>
|
<HeadOutlet/>
|
||||||
</head>
|
</head>
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||||
@using Microsoft.JSInterop
|
@using Microsoft.JSInterop
|
||||||
@using PhotinoNetAbpp
|
@using PhotinoNetApp
|
||||||
@using PhotinoNetAbpp.Components
|
@using PhotinoNetApp.Components
|
@ -2,17 +2,33 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<RootNamespace>PhotinoNetAbpp</RootNamespace>
|
<RootNamespace>PhotinoNetApp</RootNamespace>
|
||||||
|
<AssemblyName>PhotinoNetApp</AssemblyName>
|
||||||
|
<PublishSingleFile>true</PublishSingleFile>
|
||||||
|
<SelfContained>true</SelfContained>
|
||||||
|
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
|
||||||
|
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||||
|
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||||
|
<PublishTrimmed>false</PublishTrimmed>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Properties\launchSettings.json" />
|
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.1" />
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Photino.NET" Version="2.6.0" />
|
<PackageReference Include="Photino.NET" Version="2.6.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Update="wwwroot\**">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- <EmbeddedResource Include="EmbeddedFilesManifest.xml" />-->
|
||||||
|
<EmbeddedResource Include="wwwroot\**\*" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,24 +1,37 @@
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Reflection;
|
||||||
|
using Microsoft.Extensions.FileProviders;
|
||||||
using PhotinoNET;
|
using PhotinoNET;
|
||||||
using PhotinoNetAbpp.Components;
|
using PhotinoNetApp.Components;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder();
|
||||||
|
|
||||||
// Add services to the container.
|
|
||||||
builder.Services.AddRazorComponents()
|
builder.Services.AddRazorComponents()
|
||||||
.AddInteractiveServerComponents();
|
.AddInteractiveServerComponents();
|
||||||
|
builder.Services.AddSingleton<IFileProvider>(new ManifestEmbeddedFileProvider(Assembly.GetAssembly(type: typeof(Program))!, "/", "Microsoft.Extensions.FileProviders.Embedded.Manifest.xml", DateTimeOffset.Now));
|
||||||
|
|
||||||
builder.WebHost.UseWebRoot("wwwroot").UseStaticWebAssets();
|
// builder.WebHost.UseWebRoot("wwwroot");
|
||||||
|
builder.WebHost.UseStaticWebAssets();
|
||||||
builder.WebHost.UseUrls("http://localhost:5000");
|
builder.WebHost.UseUrls("http://localhost:5000");
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
// app.UseStaticFiles();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles(new StaticFileOptions
|
||||||
|
{
|
||||||
|
FileProvider = app.Services.GetService<IFileProvider>(),
|
||||||
|
// RequestPath = "/PhotinoNetApp",
|
||||||
|
ServeUnknownFileTypes = true,
|
||||||
|
});
|
||||||
|
|
||||||
app.UseAntiforgery();
|
app.UseAntiforgery();
|
||||||
app.MapRazorComponents<App>()
|
app.MapRazorComponents<App>()
|
||||||
.AddInteractiveServerRenderMode();
|
.AddInteractiveServerRenderMode();
|
||||||
|
|
||||||
|
foreach (var file in Assembly.GetExecutingAssembly().GetManifestResourceNames())
|
||||||
|
if (file.Contains("wwwroot"))
|
||||||
|
app.Logger.LogWarning($"Public file: {file}");
|
||||||
|
|
||||||
using var webServerCancellation = new CancellationTokenSource();
|
using var webServerCancellation = new CancellationTokenSource();
|
||||||
var webServerTask = app.RunAsync(webServerCancellation.Token);
|
var webServerTask = app.RunAsync(webServerCancellation.Token);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user