Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ccb8e49
Update nbgv and nerdbank.gitversioning updates to 3.9.50
renovate[bot] Nov 5, 2025
26a3acc
Fix variable persistence when value includes a single quote
AArnott Nov 5, 2025
74d3a45
Update dependency Microsoft.NET.Test.Sdk to 18.0.1
renovate[bot] Nov 11, 2025
aaccf73
Build with the .NET 10 SDK
AArnott Nov 11, 2025
adb7870
Adapt to breaking .NET 10 SDK change
AArnott Nov 11, 2025
4a6f641
Fix ARM64 detection on macOS
AArnott Nov 12, 2025
00cdc91
Build with the .NET 10 SDK (#439)
AArnott Nov 12, 2025
e1aa37c
Pin mcr.microsoft.com/dotnet/sdk Docker tag to c7445f1
renovate[bot] Nov 12, 2025
ed20107
Bump C# language version to 14
AArnott Nov 12, 2025
e95eb88
Update actions/checkout digest to 93cb6ef
renovate[bot] Nov 17, 2025
91ee72e
Replace hard-coded codecov_token with secrets/variables
AArnott Nov 17, 2025
32a3cdd
Update actions/checkout action to v6 (443)
renovate[bot] Nov 20, 2025
585a2df
Use official URLs in Install-DotNetSdk.ps1
akoeplinger Nov 21, 2025
7357a05
Merge pull request 444 from akoeplinger:patch-1
AArnott Nov 22, 2025
1439223
Update dependency xunit.v3 to 3.2.1 (445)
renovate[bot] Nov 29, 2025
a23eb8d
Merge pull request 447 to Build on newer agents
AArnott Dec 2, 2025
064bff7
Update actions/checkout digest to 8e8c483 (448)
renovate[bot] Dec 2, 2025
26355f2
Better pinning of GitHub Actions
AArnott Dec 2, 2025
5ded58b
Update actions/checkout action to v6.0.1 (449)
renovate[bot] Dec 2, 2025
9a6d745
Update actions/deploy-pages action to v4.0.5 (450)
renovate[bot] Dec 2, 2025
89853ca
Remove stray backtick from README
AArnott Dec 3, 2025
4001958
Update NuGet/login action to v1.1.0 (451)
renovate[bot] Dec 3, 2025
fddc013
Opt into Microsoft Testing Platform (MTP) (#452)
AArnott Dec 7, 2025
f761f0f
Push to nuget.org before pushing to github release
AArnott Dec 7, 2025
e403560
Update to MTP v2 (#455)
AArnott Dec 7, 2025
a28d540
Update all MTP related packages at once (457)
AArnott Dec 7, 2025
f355f00
Fix test result publishing to AzDO (458)
AArnott Dec 7, 2025
3304d79
Update .NET SDK to v10.0.101 (#459)
renovate[bot] Dec 10, 2025
63de086
Drop package dependencies that MTP does not require
AArnott Dec 10, 2025
70e71e9
Merge pull request #460 from AArnott/dropOldDependencies
AArnott Dec 10, 2025
70980c3
Fix MTP test failure for MTP-incompatible projects under the test folder
AArnott Dec 10, 2025
307d5e3
Fix testing regression from last commit
AArnott Dec 11, 2025
5c9d625
Adjust how we use IsTestProject
AArnott Dec 11, 2025
762bd46
Expand applicability of extra args in `dotnet-test-cloud.ps1`
AArnott Dec 11, 2025
25c8c0d
Update becheran/mlc action to v1.1.0 (461)
renovate[bot] Dec 12, 2025
534139c
Merge the main branch from https://github.com/aarnott/Library.Template
AArnott Dec 12, 2025
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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"rollForward": false
},
"nbgv": {
"version": "3.8.118",
"version": "3.9.50",
"commands": [
"nbgv"
],
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
FROM mcr.microsoft.com/dotnet/sdk:9.0.306-noble@sha256:d88e637d15248531967111fba05c6725ad45ea1dace3d35d8cfe2c4d4094e25d
FROM mcr.microsoft.com/dotnet/sdk:10.0.101@sha256:d1823fecac3689a2eb959e02ee3bfe1c2142392808240039097ad70644566190

# Installing mono makes `dotnet test` work without errors even for net472.
# But installing it takes a long time, so it's excluded by default.
Expand Down
6 changes: 5 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:best-practices"],
"extends": ["config:best-practices","helpers:pinGitHubActionDigestsToSemver"],
"labels": ["dependencies"],
"packageRules": [
{
Expand All @@ -11,6 +11,10 @@
"matchPackageNames": ["xunit*"],
"groupName": "xunit"
},
{
"matchPackageNames": ["Microsoft.Testing.Extensions.*"],
"groupName": "Microsoft Testing Platform"
},
{
"matchDatasources": ["dotnet-version", "docker"],
"matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"],
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BUILDCONFIGURATION: Release
# codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages/

# dotnetfoundation code signing
Expand All @@ -27,11 +26,11 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- windows-2022
- ubuntu-24.04
- windows-2025

steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
submodules: true
Expand Down Expand Up @@ -114,11 +113,13 @@ jobs:
if: success() && runner.os == 'Windows' && github.event_name != 'pull_request'
continue-on-error: true
- name: 📢 Publish code coverage results to codecov.io
run: ./tools/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}"
run: |
if ('${{ secrets.CODECOV_TOKEN }}') {
./tools/publish-CodeCov.ps1 -CodeCovToken '${{ secrets.CODECOV_TOKEN }}' -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}"
}
shell: pwsh
timeout-minutes: 3
continue-on-error: true
if: env.codecov_token != ''

functional_testing:
name: 🧪 Functional testing
Expand Down Expand Up @@ -300,8 +301,8 @@ jobs:
name: 📃 Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: 🔗 Markup Link Checker (mlc)
uses: becheran/mlc@18a06b3aa2901ca197de59c8b0b1f54fdba6b3fa # v1.0.0
uses: becheran/mlc@6fa3bddc1a921454b7840df30b343f6415bc8d35 # v1.1.0
with:
args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx -i https://www.npmjs.com/package/*,https://get.dot.net/
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: ⚙ Install prerequisites
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: ⚙ Install prerequisites
Expand All @@ -40,4 +40,4 @@ jobs:

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
2 changes: 1 addition & 1 deletion .github/workflows/libtemplate-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,8 @@ jobs:
--azure-credential-type azure-cli
shell: pwsh

- name: 💽 Upload artifacts to release
shell: pwsh
if: ${{ github.event_name == 'release' && github.event.release.assets_url != '' }}
continue-on-error: true # until we get this to work, be willing to skip it
env:
GH_TOKEN: ${{ github.token }}
run: |
Get-ChildItem '${{ runner.temp }}/deployables' -File -Recurse |% {
Write-Host "Uploading $($_.Name) to release..."
gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName
}

- name: 🪪 Authorize NuGet package push
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1.1.0
id: nuget-login
with:
user: ${{ secrets.NUGET_USER }}
Expand All @@ -127,3 +115,15 @@ jobs:
npm publish $_ --registry=https://registry.npmjs.org/
}
if: ${{ env.NPM_API_KEY_DEFINED == 'true' }}

- name: 💽 Upload artifacts to release
shell: pwsh
if: ${{ github.event_name == 'release' && github.event.release.assets_url != '' }}
continue-on-error: true # until we get this to work, be willing to skip it
env:
GH_TOKEN: ${{ github.token }}
run: |
Get-ChildItem '${{ runner.temp }}/deployables' -File -Recurse |% {
Write-Host "Uploading $($_.Name) to release..."
gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName
}
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<RestoreEnablePackagePruning>true</RestoreEnablePackagePruning>

<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/apicompat/package-validation/overview -->
<EnablePackageValidation>true</EnablePackageValidation>
Expand Down Expand Up @@ -41,7 +42,7 @@
</PropertyGroup>

<PropertyGroup>
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.csproj'">13</LangVersion>
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.csproj'">14</LangVersion>
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.vbproj'">16.9</LangVersion>
</PropertyGroup>

Expand Down
13 changes: 7 additions & 6 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<MicrosoftTestingPlatformVersion>2.0.2</MicrosoftTestingPlatformVersion>
<BenchmarkDotNetVersion>0.15.5</BenchmarkDotNetVersion>
<MSBuildPackageVersion>16.11.6</MSBuildPackageVersion>
<MSBuildPackageVersion Condition="'$(IsTestProject)'=='true'">17.14.28</MSBuildPackageVersion>
<!-- LibGit2Sharp Native Binary version - used in both main project and Cake addin -->
<LibGit2SharpNativeVersion>2.0.323</LibGit2SharpNativeVersion>
</PropertyGroup>
Expand Down Expand Up @@ -38,13 +38,14 @@
<PackageVersion Include="System.Text.Json" Version="9.0.10" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="9.0.10" />
<PackageVersion Include="Validation" Version="2.6.68" />
<PackageVersion Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.5.23" />
<PackageVersion Include="Xunit.Combinatorial" Version="2.0.24" />
</ItemGroup>
<ItemGroup Label="Library.Template">
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.CrashDump" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="xunit.v3.mtp-v2" Version="3.2.1" />
</ItemGroup>
<ItemGroup>
<!-- Put repo-specific GlobalPackageReference items in this group. -->
Expand Down
5 changes: 4 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"sdk": {
"version": "9.0.306",
"version": "10.0.101",
"rollForward": "patch",
"allowPrerelease": false
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
6 changes: 2 additions & 4 deletions test/Cake.GitVersioning.Tests/Cake.GitVersioning.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<OutputType>exe</OutputType>
<SignAssembly>false</SignAssembly>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
Expand All @@ -15,10 +15,8 @@
<ProjectReference Include="..\..\src\NerdBank.GitVersioning\Nerdbank.GitVersioning.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Nerdbank.GitVersioning.LKG" />
<PackageReference Include="xunit.runner.visualstudio" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.v3.mtp-v2" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
</PropertyGroup>

</Project>
6 changes: 6 additions & 0 deletions test/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup Condition="'$(IsTestProject)' != 'false'">
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" />
<PackageReference Include="Microsoft.Testing.Extensions.CrashDump" />
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
</ItemGroup>
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" Condition="Exists('xunit.runner.json')" />
</ItemGroup>
Expand Down
8 changes: 8 additions & 0 deletions test/Directory.Packages.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />

<PropertyGroup>
<MSBuildPackageVersion>17.14.28</MSBuildPackageVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
</PropertyGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions test/Nerdbank.GitVersioning.Tests/AssemblyInfoTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

public class AssemblyInfoTest : IClassFixture<MSBuildFixture> // The MSBuildFixture throws PlatformNotSupportedException when run on mono.
{
[SkippableTheory(typeof(PlatformNotSupportedException))]
[Theory(SkipExceptions = [typeof(PlatformNotSupportedException)])]
[InlineData(false)]
[InlineData(true)]
[InlineData(null)]
Expand Down Expand Up @@ -90,7 +90,7 @@ type internal ThisAssembly() =
Assert.Equal(expected, built);
}

[SkippableTheory(typeof(PlatformNotSupportedException))]
[Theory(SkipExceptions = [typeof(PlatformNotSupportedException)])]
[InlineData(null, "MyRootNamespace")]
[InlineData("", "MyRootNamespace")]
[InlineData("MyCustomNamespace", null)]
Expand Down Expand Up @@ -150,7 +150,7 @@ type internal ThisAssembly() =
Assert.Equal(expected, built);
}

[SkippableTheory(typeof(PlatformNotSupportedException))]
[Theory(SkipExceptions = [typeof(PlatformNotSupportedException)])]
[InlineData(false)]
[InlineData(true)]
[InlineData(null)]
Expand Down Expand Up @@ -226,7 +226,7 @@ internal static partial class ThisAssembly {{
Assert.Equal(expected, built);
}

[SkippableTheory(typeof(PlatformNotSupportedException))]
[Theory(SkipExceptions = [typeof(PlatformNotSupportedException)])]
[InlineData(null, "MyRootNamespace")]
[InlineData("", "MyRootNamespace")]
[InlineData("MyCustomNamespace", null)]
Expand Down Expand Up @@ -284,7 +284,7 @@ internal static partial class ThisAssembly {{
Assert.Equal(expected, built);
}

[SkippableTheory(typeof(PlatformNotSupportedException))]
[Theory(SkipExceptions = [typeof(PlatformNotSupportedException)])]
[InlineData(false)]
[InlineData(true)]
[InlineData(null)]
Expand Down Expand Up @@ -340,7 +340,7 @@ End Class
Assert.Equal(expected, built);
}

[SkippableTheory(typeof(PlatformNotSupportedException))]
[Theory(SkipExceptions = [typeof(PlatformNotSupportedException)])]
[InlineData(null, "MyRootNamespace")]
[InlineData("", "MyRootNamespace")]
[InlineData("MyCustomNamespace", null)]
Expand Down
4 changes: 2 additions & 2 deletions test/Nerdbank.GitVersioning.Tests/BuildIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ public async Task AssemblyInfo_HasKeyData(string keyFile, bool delaySigned)
result.BuildResult.ProjectStateAfterBuild.GetPropertyValue("VersionSourceFile"))));
this.Logger.WriteLine(versionCsContent);

SyntaxTree sourceFile = CSharpSyntaxTree.ParseText(versionCsContent);
SyntaxNode syntaxTree = await sourceFile.GetRootAsync();
SyntaxTree sourceFile = CSharpSyntaxTree.ParseText(versionCsContent, cancellationToken: TestContext.Current.CancellationToken);
SyntaxNode syntaxTree = await sourceFile.GetRootAsync(TestContext.Current.CancellationToken);
IEnumerable<VariableDeclaratorSyntax> fields = syntaxTree.DescendantNodes().OfType<VariableDeclaratorSyntax>();

var publicKeyField = (LiteralExpressionSyntax)fields.SingleOrDefault(f => f.Identifier.ValueText == "PublicKey")?.Initializer.Value;
Expand Down
4 changes: 2 additions & 2 deletions test/Nerdbank.GitVersioning.Tests/GitContextTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ public void SelectCommitByPartialId(bool fromPack, bool oddLength)
Assert.Equal(this.LibGit2Repository.Head.Tip.Sha, this.Context.GitCommitId);
}

[SkippableTheory]
[Theory]
[InlineData(4)]
[InlineData(7)]
[InlineData(8)]
[InlineData(11)]
public void GetShortUniqueCommitId(int length)
{
Skip.If(length < 7 && this.Context is Nerdbank.GitVersioning.LibGit2.LibGit2Context, "LibGit2Sharp never returns commit IDs with fewer than 7 characters.");
Assert.SkipWhen(length < 7 && this.Context is Nerdbank.GitVersioning.LibGit2.LibGit2Context, "LibGit2Sharp never returns commit IDs with fewer than 7 characters.");
Assert.Equal(this.Context.GitCommitId.Substring(0, length), this.Context.GetShortUniqueCommitId(length));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public void GetIdAsVersion_MigrationFromVersionTxtToJson()
public void TestBiggerRepo()
{
string testBiggerRepoPath = @"D:\git\Nerdbank.GitVersioning";
Skip.If(!Directory.Exists(testBiggerRepoPath), $"{testBiggerRepoPath} does not exist.");
Assert.SkipWhen(!Directory.Exists(testBiggerRepoPath), $"{testBiggerRepoPath} does not exist.");

using var largeRepo = new Repository(testBiggerRepoPath);
foreach (Commit commit in largeRepo.Head.Commits)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void CopyToUtf16StringTest()
// Common use case: create the path to the object in the Git object store,
// e.g. git/objects/[byte 0]/[bytes 1 - 19]
byte[] valueAsBytes = Encoding.Unicode.GetBytes("git/objects/00/01020304050607080910111213141516171819");
Span<char> valueAsChars = MemoryMarshal.Cast<byte, char>(valueAsBytes);
Span<char> valueAsChars = MemoryMarshal.Cast<byte, char>((Span<byte>)valueAsBytes);

var objectId = GitObjectId.ParseHex(this.shaAsHexAsciiByteArray);
objectId.CopyAsHex(0, 1, valueAsChars.Slice(12, 1 * 2));
Expand Down
Loading
Loading