Skip to content

Commit

Permalink
Add AOT project
Browse files Browse the repository at this point in the history
  • Loading branch information
shps951023 committed Feb 18, 2024
1 parent 80d2f06 commit 293d450
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions MiniAuth.AOT/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "8.0.2",
"commands": [
"dotnet-ef"
]
}
}
}
20 changes: 20 additions & 0 deletions MiniAuth.AOT/MiniAuth.AOT.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<PublishAot>true</PublishAot>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\src\MiniAuth\MiniAuth.csproj" />
</ItemGroup>

</Project>
14 changes: 14 additions & 0 deletions MiniAuth.AOT/Program.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}
}
15 changes: 15 additions & 0 deletions MiniAuth.AOT/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -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"
}
8 changes: 8 additions & 0 deletions MiniAuth.AOT/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
9 changes: 9 additions & 0 deletions MiniAuth.AOT/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
11 changes: 10 additions & 1 deletion MiniAuth.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down

0 comments on commit 293d450

Please sign in to comment.