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
27 changes: 24 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ on:
pull_request:
branches: [ '*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v5.2.0
Expand All @@ -22,18 +30,31 @@ jobs:
9.0.x
8.0.x
3.1.x
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Build and Test
run: ./Build.ps1
shell: pwsh

run-snapshots:
name: run-snapshots
needs: build
runs-on: windows-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: |
10.0.x
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Run Snapshots
run: ./RunSnapshots.ps1
shell: pwsh
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
actions: read
contents: read
Expand All @@ -41,21 +42,19 @@ jobs:
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup dotnet 10.0
- name: Setup dotnet
uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: '10.0.x'
- name: Setup dotnet 9.0
uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: '9.0.x'
- name: Setup dotnet 8.0
uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: '8.0.x'
- uses: actions/setup-dotnet@v5.2.0
dotnet-version: |
10.0.x
9.0.x
8.0.x
3.1.x
- uses: actions/cache@v4
with:
dotnet-version: '3.1.x'
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget-

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -70,7 +69,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Build and Test
run: ./Build.ps1 -v "minimal" -skiptests
run: ./Build.ps1 -v "minimal"
shell: pwsh

# ℹ️ Command-line programs to run using the OS shell.
Expand Down
27 changes: 20 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,36 @@ on:
tags:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
build:

runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: write

steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x
3.1.x
10.0.x
9.0.x
8.0.x
3.1.x
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Build and Test
run: ./Build.ps1
shell: pwsh
- name: Publish

run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate -s https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push ./artifacts/*.nupkg --api-key $env:NUGET_API_KEY --skip-duplicate -s https://api.nuget.org/v3/index.json
shell: pwsh
2 changes: 1 addition & 1 deletion docs/nuget-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ This adds a `<PackageReference>` to your project.

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<!-- Add the package -->
Expand Down
4 changes: 4 additions & 0 deletions samples/AotTrimmedSample/AotTrimmedSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' != ''">
<PackageReference Include="Vogen" Version="999.9.*" />
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' == ''">
Expand Down
4 changes: 4 additions & 0 deletions samples/ExampleExtensions/ExampleExtensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' != ''">
<PackageReference Include="Vogen" Version="999.9.*"/>
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' == ''">
Expand Down
4 changes: 4 additions & 0 deletions samples/MultiTarget/MultiTarget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' != ''">
<PackageReference Include="Vogen" Version="999.9.*" />
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' == ''">
Expand Down
4 changes: 4 additions & 0 deletions samples/Onion/Domain/Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' != ''">
<PackageReference Include="Vogen" Version="999.9.*" />
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' == ''">
Expand Down
4 changes: 4 additions & 0 deletions samples/Onion/Infra/Infra.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' != ''">
<PackageReference Include="Vogen" Version="999.9.*"/>
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' == ''">
Expand Down
4 changes: 4 additions & 0 deletions samples/OrleansExample/OrleansExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' != ''">
<PackageReference Include="Vogen" Version="999.9.*" />
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' == ''">
Expand Down
10 changes: 7 additions & 3 deletions samples/Vogen.Examples/Vogen.Examples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="JetBrains.Annotations" Version="2025.2.4" />
<PackageReference Include="MessagePack" Version="2.5.187" />

<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
Expand All @@ -29,8 +29,12 @@
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="linq2db" Version="3.7.0" />
<PackageReference Include="ServiceStack.Text" Version="8.2.2" />
<PackageReference Include="Testcontainers" Version="3.10.0" />
<PackageReference Include="Testcontainers.MongoDb" Version="3.10.0" />
<PackageReference Include="Testcontainers" Version="4.11.0" />
<PackageReference Include="Testcontainers.MongoDb" Version="4.11.0" />
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' != ''">
Expand Down
4 changes: 4 additions & 0 deletions samples/WebApplication.Shared/WebApplication.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<ItemGroup Condition=" '$(OpenApiMode)' == 'MicrosoftAndScalar'">
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0"/>
<PackageReference Include="Scalar.AspNetCore" Version="1.1.1"/>
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(OpenApiMode)' == 'Swashbuckle-net8'">
Expand Down
4 changes: 4 additions & 0 deletions samples/WebApplication/WebApplication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@

<ItemGroup>
<PackageReference Include="Refit" Version="8.0.0"/>
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(OpenApiMode)' == 'MicrosoftAndScalar'">
Expand Down
4 changes: 4 additions & 0 deletions samples/WebApplicationConsumer/WebApplicationConsumer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Refit" Version="8.0.0" />
<PackageReference Include="ServiceStack.Text" Version="8.2.2" />
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' != ''">
Expand Down
10 changes: 9 additions & 1 deletion src/Vogen.CodeFixers/Vogen.CodeFixers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<!-- Version and PackageVersion are handled in Directory.Build.targets -->
<TargetFrameworks>net9.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net10.0;netstandard2.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<IncludeBuildOutput>false</IncludeBuildOutput>
<Nullable>enable</Nullable>
Expand All @@ -18,6 +18,14 @@
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all"/>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" PrivateAssets="all"/>
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="DotNet.ReproducibleBuilds" Version="2.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
17 changes: 14 additions & 3 deletions src/Vogen.Pack/Vogen.Pack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,25 @@

<None Include="$(MSBuildThisFileDirectory)\..\Vogen\bin\roslyn4.12\$(Configuration)\netstandard2.0\Vogen.SharedTypes.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="$(MSBuildThisFileDirectory)\..\Vogen\bin\roslyn4.12\$(Configuration)\netstandard2.0\Vogen.SharedTypes.dll" Pack="true" PackagePath="lib\netstandard2.0" Visible="true" />
<None Include="$(MSBuildThisFileDirectory)\..\Vogen\bin\roslyn4.12\$(Configuration)\net9.0\Vogen.SharedTypes.dll" Pack="true" PackagePath="lib\net9.0" Visible="true" />
<None Include="$(MSBuildThisFileDirectory)\..\Vogen\bin\roslyn4.12\$(Configuration)\net9.0\Vogen.SharedTypes.xml" Pack="true" PackagePath="lib\net9.0" Visible="true" />
<None Include="$(MSBuildThisFileDirectory)\..\Vogen\bin\roslyn4.12\$(Configuration)\net9.0\Vogen.SharedTypes.xml" Pack="true" PackagePath="lib\netstandard2.0" Visible="true" />
<None Include="$(MSBuildThisFileDirectory)\..\Vogen\bin\roslyn4.12\$(Configuration)\net10.0\Vogen.SharedTypes.dll" Pack="true" PackagePath="lib\net10.0" Visible="true" />
<None Include="$(MSBuildThisFileDirectory)\..\Vogen\bin\roslyn4.12\$(Configuration)\net10.0\Vogen.SharedTypes.xml" Pack="true" PackagePath="lib\net10.0" Visible="true" />
<None Include="$(MSBuildThisFileDirectory)\..\Vogen\bin\roslyn4.12\$(Configuration)\net10.0\Vogen.SharedTypes.xml" Pack="true" PackagePath="lib\netstandard2.0" Visible="true" />
</ItemGroup>

<ItemGroup>
<Content Include="Vogen.targets" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="DotNet.ReproducibleBuilds" Version="2.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>


</Project>
10 changes: 10 additions & 0 deletions src/Vogen.SharedTypes/Vogen.SharedTypes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,14 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\strongname.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="DotNet.ReproducibleBuilds" Version="2.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
10 changes: 9 additions & 1 deletion src/Vogen/Vogen.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net9.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net10.0;netstandard2.0</TargetFrameworks>
<LanguageVersion>latest</LanguageVersion>
<ImplicitUsings>disable</ImplicitUsings>
<nullable>enable</nullable>
Expand Down Expand Up @@ -56,6 +56,14 @@
<PackageReference Include="Microsoft.CodeAnalysis.AnalyzerUtilities" Version="3.3.4" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
<PackageReference Include="PolySharp" Version="1.15.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<PackageReference Update="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="DotNet.ReproducibleBuilds" Version="2.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading