diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 31cf291..f80bcca 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -19,7 +19,7 @@ Template files in `src/Data/` are embedded as resources, not file system copies: Access via `Assembly.GetManifestResourceStream("solrevdev.seedfolder.Data.{filename}")` in `WriteFileAsync()` ### Multi-Framework Targeting -Targets `net8.0;net9.0` for modern .NET compatibility. .NET 8 is LTS (supported until November 2026) and .NET 9 is STS (18-month support). Version bumps in `.csproj` trigger NuGet deployment. +Targets `net10.0;net11.0`, the supported .NET versions. `global.json` pins SDK `10.0.100` with `rollForward: latestMajor`, so .NET 10 (LTS) is the baseline and the newest installed SDK is used. With SDK 11 installed the project builds `net10.0` and `net11.0`. With only SDK 10 it builds `net10.0` alone, because `TargetFrameworks` adds `net11.0` only when `NETCoreSdkVersion` is 11.0 or later. CI installs both SDKs, so the published package always holds both targets. .NET 8 and .NET 9 left support on 10 November 2026 and are no longer targeted. `RollForward` is `Major`, so the tool also runs on newer runtimes. Version bumps in `.csproj` trigger NuGet deployment on push to `master`. ## Key Development Workflows diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc75b91..9ca55c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,19 +53,36 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: | - 8.0.x - 9.0.x 10.0.x + 11.0.x - name: dotnet build run: dotnet build solrevdev.seedfolder.sln --configuration Release - - name: run integration tests - run: ./tests/integration-test.sh + - name: run integration tests (net10.0) + run: ./tests/integration-test.sh net10.0 + + - name: run integration tests (net11.0) + run: ./tests/integration-test.sh net11.0 - name: dotnet pack run: dotnet pack solrevdev.seedfolder.sln -c Release --no-build --include-source --include-symbols + - name: check package targets + shell: bash + run: | + set -euo pipefail + # The targets depend on the SDK that built them; fail rather than + # ship a package missing one. + version=$(sed -n 's:.*\(.*\).*:\1:p' src/solrevdev.seedfolder.csproj) + # Name the exact file: a glob would also match the symbols package, + # and unzip reads any extra argument as a member filter. + LISTING=$(unzip -l "src/nupkg/solrevdev.seedfolder.${version}.nupkg") + for tfm in net10.0 net11.0; do + grep -q "tools/$tfm/any/solrevdev.seedfolder.dll" <<<"$LISTING" \ + || { echo "Package is missing tools/$tfm" >&2; exit 1; } + done + - name: verify versioned package id: package shell: bash diff --git a/.vscode/launch.json b/.vscode/launch.json index a18bd59..cf7dc41 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/src/bin/Debug/net8.0/solrevdev.seedfolder.dll", + "program": "${workspaceFolder}/src/bin/Debug/net10.0/solrevdev.seedfolder.dll", "args": [], "cwd": "${workspaceFolder}", // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console diff --git a/AGENTS.md b/AGENTS.md index 28f0e98..c78369f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,11 @@ This file documents the project-specific guidance for coding agents working in t ## Project overview -`seedfolder` is a .NET Global Tool that creates project directories from embedded templates. The application is a single-file console program in `src/Program.cs` and targets `net8.0`, `net9.0`, and `net10.0`. +`seedfolder` is a .NET Global Tool that creates project directories from embedded templates. The application is a single-file console program in `src/Program.cs` and targets `net10.0` and `net11.0`. Only supported .NET versions are targeted; .NET 8 and .NET 9 left support on 10 November 2026. + +## SDK policy + +`global.json` pins SDK `10.0.100` with `rollForward: latestMajor`, so .NET 10 (LTS) is the baseline and the newest installed SDK is used. With SDK 11 installed the project builds `net10.0` and `net11.0`. With only SDK 10 it builds `net10.0` alone, because `TargetFrameworks` adds `net11.0` only when `NETCoreSdkVersion` is 11.0 or later. CI installs both SDKs, so the published package always holds both targets. Do not drop the `TargetFrameworks` condition or the explicit `10.0.x` and `11.0.x` entries in `ci.yml`. ## Required validation @@ -12,7 +16,8 @@ Run the same Release-mode sequence used by CI: ```bash dotnet build solrevdev.seedfolder.sln --configuration Release -./tests/integration-test.sh +./tests/integration-test.sh net10.0 +./tests/integration-test.sh net11.0 # needs SDK 11 dotnet pack solrevdev.seedfolder.sln -c Release --no-build --include-source --include-symbols ``` diff --git a/README.md b/README.md index d70ebb9..d41c801 100644 --- a/README.md +++ b/README.md @@ -436,10 +436,11 @@ git commit -m "Initial commit" ## Requirements -This tool requires **.NET 8.0, .NET 9.0, or .NET 10.0 SDK** to be installed on your system. +This tool requires the **.NET 10.0 SDK or later** to be installed on your system. .NET 11 is used when present. - **Supported Platforms**: Windows, macOS, Linux -- **Runtime**: .NET 8.0 or later +- **Runtime**: .NET 10.0 or later +- **Older runtimes**: From 1.7.0 the tool no longer targets .NET 8 or .NET 9, which left support on 10 November 2026. A machine with only .NET 8 or .NET 9 cannot install new releases. Install .NET 10 or later, or pin version 1.6.2. - **Installation**: Via .NET Global Tools ## Installation @@ -489,13 +490,18 @@ dotnet run --project src/solrevdev.seedfolder.csproj --framework net10.0 -- --te # If you omit `--` and run `dotnet run --project ... --help`, the .NET CLI help will be shown. ``` +### SDK policy + +`global.json` pins SDK `10.0.100` with `rollForward: latestMajor`, so .NET 10 (LTS) is the baseline and the newest installed SDK is used. With SDK 11 installed the project builds `net10.0` and `net11.0`. With only SDK 10 it builds `net10.0` alone, because `TargetFrameworks` adds `net11.0` only when `NETCoreSdkVersion` is 11.0 or later. CI installs both SDKs, so the published package always holds both targets. + ### Building and Testing ```bash # Build the project dotnet build -# Run tests -dotnet test +# Run the integration tests for each target framework +./tests/integration-test.sh net10.0 +./tests/integration-test.sh net11.0 # needs SDK 11 # Create package dotnet pack -c release diff --git a/global.json b/global.json new file mode 100644 index 0000000..a49afd6 --- /dev/null +++ b/global.json @@ -0,0 +1 @@ +{ "sdk": { "version": "10.0.100", "rollForward": "latestMajor", "allowPrerelease": false } } diff --git a/src/solrevdev.seedfolder.csproj b/src/solrevdev.seedfolder.csproj index 24a5829..93f561e 100644 --- a/src/solrevdev.seedfolder.csproj +++ b/src/solrevdev.seedfolder.csproj @@ -2,7 +2,9 @@ Exe - net8.0;net9.0;net10.0 + + net10.0 + net10.0;net11.0 latest