From 293d450d2daa09cb8f2c9eee6f00c360e4349cae Mon Sep 17 00:00:00 2001 From: Wei Lin Date: Sun, 18 Feb 2024 12:00:49 +0800 Subject: [PATCH] Add AOT project --- .gitignore | 6 ++++++ MiniAuth.AOT/.config/dotnet-tools.json | 12 ++++++++++++ MiniAuth.AOT/MiniAuth.AOT.csproj | 20 ++++++++++++++++++++ MiniAuth.AOT/Program.cs | 14 ++++++++++++++ MiniAuth.AOT/Properties/launchSettings.json | 15 +++++++++++++++ MiniAuth.AOT/appsettings.Development.json | 8 ++++++++ MiniAuth.AOT/appsettings.json | 9 +++++++++ MiniAuth.sln | 11 ++++++++++- 8 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 MiniAuth.AOT/.config/dotnet-tools.json create mode 100644 MiniAuth.AOT/MiniAuth.AOT.csproj create mode 100644 MiniAuth.AOT/Program.cs create mode 100644 MiniAuth.AOT/Properties/launchSettings.json create mode 100644 MiniAuth.AOT/appsettings.Development.json create mode 100644 MiniAuth.AOT/appsettings.json diff --git a/.gitignore b/.gitignore index 9491a2f..ac7161c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,12 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +# +*.cer +*.db +*.trx +*.pfx + # User-specific files *.rsuser *.suo diff --git a/MiniAuth.AOT/.config/dotnet-tools.json b/MiniAuth.AOT/.config/dotnet-tools.json new file mode 100644 index 0000000..9d58272 --- /dev/null +++ b/MiniAuth.AOT/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "8.0.2", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/MiniAuth.AOT/MiniAuth.AOT.csproj b/MiniAuth.AOT/MiniAuth.AOT.csproj new file mode 100644 index 0000000..b217a76 --- /dev/null +++ b/MiniAuth.AOT/MiniAuth.AOT.csproj @@ -0,0 +1,20 @@ + + + + net8.0 + enable + enable + true + true + Linux + + + + + + + + + + + diff --git a/MiniAuth.AOT/Program.cs b/MiniAuth.AOT/Program.cs new file mode 100644 index 0000000..b954a90 --- /dev/null +++ b/MiniAuth.AOT/Program.cs @@ -0,0 +1,14 @@ +namespace MiniAuth.AOT +{ + public class Program + { + public static void Main(string[] args) + { + var builder = WebApplication.CreateSlimBuilder(args); + var app = builder.Build(); + app.UseMiniAuth(); + app.MapGet("/", () => "Hello MiniAuth! Please view https://github.com/mini-software/MiniAuth"); + app.Run(); + } + } +} diff --git a/MiniAuth.AOT/Properties/launchSettings.json b/MiniAuth.AOT/Properties/launchSettings.json new file mode 100644 index 0000000..ced8a8f --- /dev/null +++ b/MiniAuth.AOT/Properties/launchSettings.json @@ -0,0 +1,15 @@ +{ + "profiles": { + "http": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:5036" + } + }, + "$schema": "http://json.schemastore.org/launchsettings.json" +} \ No newline at end of file diff --git a/MiniAuth.AOT/appsettings.Development.json b/MiniAuth.AOT/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/MiniAuth.AOT/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/MiniAuth.AOT/appsettings.json b/MiniAuth.AOT/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/MiniAuth.AOT/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/MiniAuth.sln b/MiniAuth.sln index 23a4143..b19e91c 100644 --- a/MiniAuth.sln +++ b/MiniAuth.sln @@ -34,6 +34,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ .github\workflows\main.yml = .github\workflows\main.yml EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{4957A4E0-CC6C-4959-94E6-04A7A59939F8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiniAuth.AOT", "MiniAuth.AOT\MiniAuth.AOT.csproj", "{1AB589D7-A158-4933-A82E-7B3E939CA26B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -52,15 +56,20 @@ Global {F49D7CE6-7FB0-4A2F-B20A-4D11F99F8BCF}.Debug|Any CPU.Build.0 = Debug|Any CPU {F49D7CE6-7FB0-4A2F-B20A-4D11F99F8BCF}.Release|Any CPU.ActiveCfg = Release|Any CPU {F49D7CE6-7FB0-4A2F-B20A-4D11F99F8BCF}.Release|Any CPU.Build.0 = Release|Any CPU + {1AB589D7-A158-4933-A82E-7B3E939CA26B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1AB589D7-A158-4933-A82E-7B3E939CA26B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1AB589D7-A158-4933-A82E-7B3E939CA26B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1AB589D7-A158-4933-A82E-7B3E939CA26B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {88B49A17-3C7A-406A-B257-F244A92302F8} = {F97A714F-28E9-40E4-AA78-2238B8E4A05D} - {6EA661B7-B70C-4E47-8433-421D9E9E017F} = {119A6AF1-E780-4B91-A26A-EA6647E1C1D4} + {6EA661B7-B70C-4E47-8433-421D9E9E017F} = {4957A4E0-CC6C-4959-94E6-04A7A59939F8} {F49D7CE6-7FB0-4A2F-B20A-4D11F99F8BCF} = {119A6AF1-E780-4B91-A26A-EA6647E1C1D4} {D14A76BB-35FE-4E58-8243-582552DC531E} = {A09BB832-5386-4D43-BA9A-3F78DD06E19E} + {1AB589D7-A158-4933-A82E-7B3E939CA26B} = {F97A714F-28E9-40E4-AA78-2238B8E4A05D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {823332EF-B62C-41B2-9730-7D7E555A9D1C}