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
11 changes: 11 additions & 0 deletions .claude/docs/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
## Common Commands

```bash
# Build (fast inner loop — use dev solution, separate restore, graph scheduling)
dotnet restore TUnit.Dev.slnx
dotnet build TUnit.Dev.slnx --no-restore -graphBuild:True

# Build with centralized output layout
dotnet build TUnit.Dev.slnx --no-restore -graphBuild:True --artifacts-path artifacts

# Build full solution (CI or pre-commit)
dotnet restore TUnit.slnx
dotnet build TUnit.slnx --no-restore -graphBuild:True

# Run all tests (excludes TUnit.TestProject)
dotnet test

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,14 @@ jobs:
id: gitversion
uses: gittools/actions/gitversion/execute@v3

- name: Restore
shell: bash
run: dotnet restore TUnit.CI.slnx

- name: Build
shell: bash
run: >-
dotnet build TUnit.CI.slnx -c Release
dotnet build TUnit.CI.slnx -c Release --no-restore -graphBuild:True
"-p:Version=${{ steps.gitversion.outputs.semVer }}"
"-p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }}"
"-p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }}"
Expand Down
18 changes: 18 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>

<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
<!-- Hard links cause file lock conflicts when multiple AOT publish processes run in parallel,
because all test project outputs point to the same inode for shared assemblies like TUnit.Assertions.dll -->

<TrimmerSingleWarn>false</TrimmerSingleWarn>
<NoWarn>NU1507;NU1903;CS9107</NoWarn>
<BuildTransitivePath>buildTransitive/$(TargetFramework)/</BuildTransitivePath>
Expand Down Expand Up @@ -96,4 +102,16 @@
</PackageReference>
</ItemGroup>

<!-- GitVersion only needed by the 4 core library projects that produce versioned NuGet packages -->
<ItemGroup Condition="
'$(MSBuildProjectName)' == 'TUnit.Core' or
'$(MSBuildProjectName)' == 'TUnit.Engine' or
'$(MSBuildProjectName)' == 'TUnit.Mocks' or
'$(MSBuildProjectName)' == 'TUnit.Assertions'">
<PackageReference Include="GitVersion.MsBuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
5 changes: 1 addition & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
</PropertyGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.201" />
<GlobalPackageReference Include="GitVersion.MsBuild" Version="6.7.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</GlobalPackageReference>
</ItemGroup>
<ItemGroup>
<PackageVersion Include="Aspire.Hosting.AppHost" Version="13.2.1" />
Expand All @@ -22,6 +18,7 @@
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="12.1.1" />
<PackageVersion Include="FsCheck" Version="3.3.2" />
<PackageVersion Include="FSharp.Core" Version="11.0.100" />
<PackageVersion Include="GitVersion.MsBuild" Version="6.7.0" />
<PackageVersion Include="Humanizer" Version="3.0.10" />
<PackageVersion Include="MessagePack" Version="3.1.4" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.5" />
Expand Down
66 changes: 66 additions & 0 deletions TUnit.Dev.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<Solution>
<Configurations>
<Platform Name="Any CPU" />
<Platform Name="x64" />
<Platform Name="x86" />
</Configurations>

<!-- Core framework packages -->
<Folder Name="/Core/">
<Project Path="TUnit/TUnit.csproj" />
<Project Path="TUnit.Core/TUnit.Core.csproj" />
<Project Path="TUnit.Engine/TUnit.Engine.csproj" />
<Project Path="TUnit.Assertions/TUnit.Assertions.csproj" />
<Project Path="TUnit.Assertions.FSharp/TUnit.Assertions.FSharp.fsproj" />
</Folder>

<!-- Extension libraries and integrations -->
<Folder Name="/Libraries/">
<Project Path="TUnit.Aspire/TUnit.Aspire.csproj" />
<Project Path="TUnit.AspNetCore/TUnit.AspNetCore.csproj" />
<Project Path="TUnit.FsCheck/TUnit.FsCheck.csproj" />
<Project Path="TUnit.Logging.Microsoft/TUnit.Logging.Microsoft.csproj" />
<Project Path="TUnit.Mocks/TUnit.Mocks.csproj" />
<Project Path="TUnit.Mocks.Assertions/TUnit.Mocks.Assertions.csproj" />
<Project Path="TUnit.Mocks.Http/TUnit.Mocks.Http.csproj" />
<Project Path="TUnit.Mocks.Logging/TUnit.Mocks.Logging.csproj" />
<Project Path="TUnit.Playwright/TUnit.Playwright.csproj" />
</Folder>

<!-- Roslyn analyzers and code fixers (base projects only, no Roslyn version variants) -->
<Folder Name="/Analyzers/">
<Project Path="TUnit.Analyzers/TUnit.Analyzers.csproj" />
<Project Path="TUnit.Analyzers.CodeFixers/TUnit.Analyzers.CodeFixers.csproj" />
<Project Path="TUnit.AspNetCore.Analyzers/TUnit.AspNetCore.Analyzers.csproj" />
<Project Path="TUnit.Assertions.Analyzers/TUnit.Assertions.Analyzers.csproj" />
<Project Path="TUnit.Assertions.Analyzers.CodeFixers/TUnit.Assertions.Analyzers.CodeFixers.csproj" />
<Project Path="TUnit.Mocks.Analyzers/TUnit.Mocks.Analyzers.csproj" />
</Folder>

<!-- Source generators (base projects only, no Roslyn version variants) -->
<Folder Name="/SourceGenerators/">
<Project Path="TUnit.Assertions.SourceGenerator/TUnit.Assertions.SourceGenerator.csproj" />
<Project Path="TUnit.Core.SourceGenerator/TUnit.Core.SourceGenerator.csproj" />
<Project Path="TUnit.Mocks.SourceGenerator/TUnit.Mocks.SourceGenerator.csproj" />
</Folder>

<!-- Test projects -->
<Folder Name="/Tests/">
<Project Path="TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj" />
<Project Path="TUnit.AspNetCore.Analyzers.Tests/TUnit.AspNetCore.Analyzers.Tests.csproj" />
<Project Path="TUnit.Assertions.Analyzers.CodeFixers.Tests/TUnit.Assertions.Analyzers.CodeFixers.Tests.csproj" />
<Project Path="TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj" />
<Project Path="TUnit.Assertions.SourceGenerator.Tests/TUnit.Assertions.SourceGenerator.Tests.csproj" />
<Project Path="TUnit.Assertions.Tests/TUnit.Assertions.Tests.csproj" />
<Project Path="TUnit.Core.SourceGenerator.Tests/TUnit.Core.SourceGenerator.Tests.csproj" />
<Project Path="TUnit.Engine.Tests/TUnit.Engine.Tests.csproj" />
<Project Path="TUnit.Mocks.Analyzers.Tests/TUnit.Mocks.Analyzers.Tests.csproj" />
<Project Path="TUnit.Mocks.Http.Tests/TUnit.Mocks.Http.Tests.csproj" />
<Project Path="TUnit.Mocks.Logging.Tests/TUnit.Mocks.Logging.Tests.csproj" />
<Project Path="TUnit.Mocks.SourceGenerator.Tests/TUnit.Mocks.SourceGenerator.Tests.csproj" />
<Project Path="TUnit.Mocks.Tests/TUnit.Mocks.Tests.csproj" />
<Project Path="TUnit.PublicAPI/TUnit.PublicAPI.csproj" />
<Project Path="TUnit.RpcTests/TUnit.RpcTests.csproj" />
<Project Path="TUnit.UnitTests/TUnit.UnitTests.csproj" />
</Folder>
</Solution>
Loading