Skip to content

Migrate Paket builds to NuGet and all tests to MTP v2 - #314

Merged
sergey-tihon merged 10 commits into
masterfrom
feature/no-paket
Oct 13, 2026
Merged

sergey-tihon merged 10 commits into
masterfrom
feature/no-paket

Conversation

@sergey-tihon

@sergey-tihon sergey-tihon commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replace Paket manifests, lockfiles, references, and packaging templates with explicit NuGet project references and dotnet pack; remove obsolete Paket build/sample scaffolding.
  • Restore .NET Framework consumer targets: FsUnit.xUnit and Fs30Unit.MsTest target net8.0;netstandard2.0; FsUnit (NUnit 5) targets net8.0;net462. NUnit 5 has no netstandard2.0 build, so net462 is the .NET Framework target.
  • Keep test executables on net8.0 and run NUnit, xUnit v3, and MSTest with Microsoft Testing Platform v2. Test project references resolve the net8.0 library builds; net462 is compiled, not executed on macOS/Linux.
  • Keep dependency versions with their consuming .fsproj files; use RELEASE_NOTES.md as the package version source and pin Fake build tooling.
  • Pin updated test frameworks/adapters: NUnit 5.0.0 and adapter 6.3.1; MSTest framework/adapter 4.5.1; xUnit v3 MTP v2 4.0.2.
  • Pass release notes through the environment to preserve punctuation; generate .snupkg symbols and verify/upload them in the NuGet Trusted Publishing workflow.
  • Update docs to reference test build outputs and fix the MSTest assembly path and union-case quotation examples.

Verification

  • DOTNET_ROLL_FORWARD=Major ./build.sh NuGet passed: Release builds compiled NUnit net8.0/net462, xUnit and MSTest net8.0/netstandard2.0; all 946 tests passed; three .nupkg and three .snupkg files were created in bin/.
  • Verified package contents and nuspec dependency groups for net8.0 plus .NETStandard2.0 (xUnit/MSTest), and net8.0 plus .NETFramework4.6.2 (NUnit).
  • DOTNET_ROLL_FORWARD=Major dotnet run --project build/build.fsproj -- GenerateDocs completed and generated output/xUnit.html.
  • Builds still emit NU1608 dependency-constraint warnings involving FSharp.Core resolution; the build-tool restore also warns about its FSharp.Compiler.Service/FSharp.Core constraint.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The migration is internally consistent, verified across all test suites, and no unresolved correctness issues were identified.

0 open findings

What changed in this PR

Migrates dependency management and packaging from Paket to NuGet CPM and SDK tooling.

Changes:

  • Centralizes NuGet versions and updates project references.
  • Packages three net8.0 libraries with symbols.
  • Adds Trusted Publishing and removes obsolete Paket assets.
File Description
tests/​FsUnit.Xunit.Test/​paket.references Removes Paket references.
tests/​FsUnit.Xunit.Test/​FsUnit.Xunit.Test.fsproj Adds NuGet test dependencies.
tests/​FsUnit.NUnit.Test/​paket.references Removes Paket references.
tests/​FsUnit.NUnit.Test/​FsUnit.NUnit.Test.fsproj Adds NuGet test dependencies.
tests/​FsUnit.MsTest.Test/​paket.references Removes Paket references.
tests/​FsUnit.MsTest.Test/​FsUnit.MsTest.Test.fsproj Adds NuGet test dependencies.
src/​install.ps1 Removes legacy binding redirects.
src/​FsUnit.Xunit/​sample.paket.template Removes obsolete sample package.
src/​FsUnit.Xunit/​paket.template Removes Paket packaging metadata.
src/​FsUnit.Xunit/​paket.references Removes Paket references.
src/​FsUnit.Xunit/​FsUnitSample.fs.pp Removes legacy sample content.
src/​FsUnit.Xunit/​FsUnit.Xunit.fsproj Adds SDK packaging and targets net8.0.
src/​FsUnit.NUnit/​sample.paket.template Removes obsolete sample package.
src/​FsUnit.NUnit/​paket.template Removes Paket packaging metadata.
src/​FsUnit.NUnit/​paket.references Removes Paket references.
src/​FsUnit.NUnit/​FsUnitSample.fs.pp Removes legacy sample content.
src/​FsUnit.NUnit/​FsUnit.NUnit.fsproj Adds SDK packaging metadata.
src/​FsUnit.MsTestUnit/​sample.paket.template Removes obsolete sample package.
src/​FsUnit.MsTestUnit/​paket.template Removes Paket packaging metadata.
src/​FsUnit.MsTestUnit/​paket.references Removes Paket references.
src/​FsUnit.MsTestUnit/​FsUnitSample.fs.pp Removes legacy sample content.
src/​FsUnit.MsTestUnit/​FsUnit.MsTest.fsproj Adds SDK packaging and targets net8.0.
README.md Documents CPM and publishing.
paket.lock Removes Paket lock data.
paket.dependencies Removes Paket dependency configuration.
FsUnit.slnx Removes obsolete Paket entries.
docs/​xUnit.fsx Loads xUnit build outputs.
docs/​NUnit.fsx Loads NUnit build outputs.
docs/​MsTest.fsx Loads MSTest build outputs.
docs/​index.fsx Loads NUnit test outputs.
docs/​FsUnitTyped.fsx Loads NUnit test outputs.
Directory.Packages.props Defines central package versions.
Directory.Build.props Defines shared package metadata and symbols.
build/​build.fsproj Excludes build tooling from CPM.
build/​build.fs Replaces Paket packaging with dotnet pack.
build.sh Removes Paket restore.
build.cmd Removes Paket restore.
.gitignore Removes Paket-specific exclusions.
.github/​workflows/​publish.yml Adds Trusted Publishing workflow.
.github/​workflows/​main.yml Removes Paket restore from CI.
.config/​dotnet-tools.json Replaces Paket with dotnet-outdated.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@CaptnCodr CaptnCodr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating all frameworks can be smart here when we drop netstandard2.0 and have a major release anyways.

Comment thread Directory.Packages.props Outdated
Comment thread Directory.Packages.props Outdated
Comment thread Directory.Packages.props Outdated
@sergey-tihon

Copy link
Copy Markdown
Member Author

Following up on the framework-upgrade suggestion: all library assets now target net8.0, and test dependencies are upgraded to current stable versions (MSTest 4.5.1, xUnit v3 4.0.2, xUnit VS runner 4.0.1, NUnit adapter 6.3.1, Microsoft.NET.Test.Sdk 18.10.1). FSharp.Core remains pinned at 5.0.2 as the library compatibility lower bound.

@CaptnCodr
CaptnCodr self-requested a review October 11, 2026 06:27
@sergey-tihon sergey-tihon changed the title Migrate Paket builds to NuGet CPM Replace Paket with NuGet builds and project-level versions Oct 11, 2026
@sergey-tihon sergey-tihon self-assigned this Oct 11, 2026
@sergey-tihon sergey-tihon changed the title Replace Paket with NuGet builds and project-level versions Migrate Paket builds to NuGet and all tests to MTP v2 Oct 12, 2026
@sergey-tihon
sergey-tihon marked this pull request as ready for review October 12, 2026 13:34
@sergey-tihon
sergey-tihon requested a balanced review from Copilot October 12, 2026 13:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

It introduces consumer compatibility regressions and fails to publish the generated symbol packages.

3 open findings
Previously missed (1)

In code that hasn't changed since last review

Medium severity Include symbol packages when pushing NuGet artifacts

.github/​workflows/​publish.yml:73

This glob excludes .snupkg files, and pushing an .nupkg does not automatically publish its sibling symbol package. The workflow verifies and transfers the symbols but then leaves all three unpublished; include both artifact globs in the push loop.

🧠 Review effort: Balanced

Comment thread src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj Outdated
Comment thread src/FsUnit.Xunit/FsUnit.Xunit.fsproj Outdated
Comment thread src/FsUnit.NUnit/FsUnit.NUnit.fsproj Outdated
@sergey-tihon
sergey-tihon merged commit 03ba0f8 into master Oct 13, 2026
3 checks passed
@sergey-tihon
sergey-tihon deleted the feature/no-paket branch October 13, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants