Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
6.0.*
8.0.*
9.0.*
10.0.*

- name: Git checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -145,7 +146,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
dotnet-version: 10.0.*

- name: Install code signing tool
run: dotnet tool install --global sign --prerelease
Expand Down Expand Up @@ -205,7 +206,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
source-url: ${{ vars.AZURE_ARTIFACTS_FEED_URL }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -236,7 +237,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x

- name: Download signed packages
uses: actions/download-artifact@v4
Expand Down
30 changes: 30 additions & 0 deletions src/Content/NetCoreTool.Template.WebApi/CSharp/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
!**/.gitignore
!.git/HEAD
!.git/config
!.git/packed-refs
!.git/refs/heads/**
66 changes: 47 additions & 19 deletions src/Content/NetCoreTool.Template.WebApi/CSharp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.user
*.userosscache
*.sln.docstates
*.env

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
Expand All @@ -21,17 +22,37 @@ mono_crash.*
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/

[Dd]ebug/x64/
[Dd]ebugPublic/x64/
[Rr]elease/x64/
[Rr]eleases/x64/
bin/x64/
obj/x64/

[Dd]ebug/x86/
[Dd]ebugPublic/x86/
[Rr]elease/x86/
[Rr]eleases/x86/
bin/x86/
obj/x86/

[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
[Aa][Rr][Mm]64[Ee][Cc]/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/

# Build results on 'Bin' directories
**/[Bb]in/*
# Uncomment if you have tasks that rely on *.refresh files to move binaries
# (https://github.com/github/gitignore/pull/3736)
#!**/[Bb]in/*.refresh

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
Expand All @@ -43,12 +64,16 @@ Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*.trx

# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml

# Approval Tests result files
*.received.*

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
Expand All @@ -75,6 +100,7 @@ StyleCopReport.xml
*.ilk
*.meta
*.obj
*.idb
*.iobj
*.pch
*.pdb
Expand Down Expand Up @@ -155,6 +181,7 @@ coverage*.info

# NCrunch
_NCrunch_*
.NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

Expand Down Expand Up @@ -296,9 +323,6 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp

# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
Expand All @@ -316,22 +340,22 @@ node_modules/
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
**/.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/
**/.fake/

# CodeRush personal settings
.cr/personal
**/.cr/personal

# Python Tools for Visual Studio (PTVS)
__pycache__/
**/__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
#tools/**
#!tools/packages.config

# Tabs Studio
*.tss
Expand All @@ -353,15 +377,19 @@ ASALocalRun/

# MSBuild Binary and Structured Log
*.binlog
MSBuild_Logs/

# AWS SAM Build and Temporary Artifacts folder
.aws-sam

# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
.mfractor/
**/.mfractor/

# Local History for Visual Studio
.localhistory/
**/.localhistory/

# Visual Studio History (VSHistory) files
.vshistory/
Expand All @@ -373,7 +401,7 @@ healthchecksdb
MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/
**/.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd
Expand All @@ -384,17 +412,17 @@ FodyWeavers.xsd
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp

# JetBrains Rider
*.sln.iml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
"Dockerfile"
]
},
{
"condition": "(!DockerfileOption)",
"exclude": [
".dockerignore"
]
},
{
"condition": "(!HasMessagingRabbitMqListenerInSteeltoeV3)",
"exclude": [
Expand All @@ -79,6 +85,10 @@
{
"choice": "net9.0",
"description": "Target net9.0"
},
{
"choice": "net10.0",
"description": "Target net10.0"
}
],
"defaultValue": "net8.0",
Expand Down Expand Up @@ -111,6 +121,15 @@
"pattern": "^net9\\.0$"
}
},
"IsFrameworkNet100": {
"type": "generated",
"generator": "regexMatch",
"datatype": "bool",
"parameters": {
"source": "Framework",
"pattern": "^net10\\.0$"
}
},
"SteeltoeVersionOption": {
"description": "The Steeltoe version to use.",
"type": "parameter",
Expand Down Expand Up @@ -773,6 +792,10 @@
"parameters": {
"datatype": "string",
"cases": [
{
"condition": "(Framework == 'net10.0')",
"value": "6.1.*"
},
{
"condition": "(Framework == 'net9.0')",
"value": "6.0.*"
Expand All @@ -795,6 +818,10 @@
"parameters": {
"datatype": "string",
"cases": [
{
"condition": "(Framework == 'net10.0')",
"value": "9.6.*"
},
{
"condition": "(Framework == 'net9.0')",
"value": "9.3.*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
<!--#endif -->
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!--#if (DockerfileOption) -->
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>.</DockerfileContext>
<!--#endif -->
</PropertyGroup>
<!--#if (HasAnySteeltoe) -->

<PropertyGroup>
<!--#if (HasChosenSteeltoeVersionInIDE) -->
Expand All @@ -16,12 +21,15 @@
<SteeltoeVersion>$(SteeltoeVersionInCLI)</SteeltoeVersion>
<!--#endif -->
</PropertyGroup>
<!--#endif -->

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Condition="'$(IsFrameworkNet60)' == 'True'" Version="6.5.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Condition="'$(IsFrameworkNet80)' == 'True'" Version="8.0.*" />
<PackageReference Include="Swashbuckle.AspNetCore" Condition="'$(IsFrameworkNet80)' == 'True'" Version="6.6.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Condition="'$(IsFrameworkNet90)' == 'True'" Version="9.0.*" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Condition="'$(IsFrameworkNet100)' == 'True'" Version="10.0.*" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Condition="'$(DockerfileOption)' == 'True'" Version="1.23.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Condition="'$(IsFrameworkNet60)' == 'True'" Version="6.5.0" />
Comment thread
bart-vmware marked this conversation as resolved.
<PackageReference Include="Swashbuckle.AspNetCore" Condition="'$(IsFrameworkNet80)' == 'True'" Version="6.6.2" />
</ItemGroup>
<!--#if (HasAnySteeltoe) -->

Expand Down
12 changes: 7 additions & 5 deletions src/Content/NetCoreTool.Template.WebApi/CSharp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
#elif (IsFrameworkNet90)
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
#elif (IsFrameworkNet100)
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
#endif
#if (IsFrameworkNet80 || IsFrameworkNet90)
#if (IsFrameworkNet80 || IsFrameworkNet90 || IsFrameworkNet100)
USER $APP_UID
#endif
WORKDIR /app
Expand All @@ -24,12 +26,12 @@ EXPOSE 8081
# This stage is used to build the service project
#if (IsFrameworkNet60)
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
#endif
#if (IsFrameworkNet80)
#elif (IsFrameworkNet80)
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
#endif
#if (IsFrameworkNet90)
#elif (IsFrameworkNet90)
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
#elif (IsFrameworkNet100)
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
#endif
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
Expand Down
10 changes: 5 additions & 5 deletions src/Content/NetCoreTool.Template.WebApi/CSharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
#elif (IsFrameworkNet90)
#elif (IsFrameworkNet90 || IsFrameworkNet100)
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();
#endif
Expand Down Expand Up @@ -345,7 +345,7 @@
#if (IsFrameworkNet60 || IsFrameworkNet80)
app.UseSwagger();
app.UseSwaggerUI();
#elif (IsFrameworkNet90)
#elif (IsFrameworkNet90 || IsFrameworkNet100)
app.MapOpenApi();
#endif
}
Expand Down Expand Up @@ -376,11 +376,11 @@
.ToArray();
return forecast;
})
#if (IsFrameworkNet60)
.WithName("GetWeatherForecast");
#else
#if (IsFrameworkNet80)
.WithName("GetWeatherForecast")
.WithOpenApi();
#else
.WithName("GetWeatherForecast");
#endif

#if (HasMessagingRabbitMqClientInSteeltoeV3)
Expand Down
Loading