Skip to content

Conversation

@devlead
Copy link
Member

@devlead devlead commented Oct 23, 2025

Adds DotNetTestPathType enum and PathType property to DotNetTestSettings to support explicit --project and --solution parameters required by .NET 10+.

Changes:

  • Add DotNetTestPathType enum with None, Auto, Project, and Solution values
  • Add PathType property to DotNetTestSettings (defaults to None for backward compatibility)
  • Update DotNetTester to handle path type logic with switch expressions
  • Add comprehensive unit tests covering all path type scenarios
  • Support auto-detection based on file extensions (.sln, .csproj, .vbproj, .fsproj, .vcxproj)

fixes #4627

…tibility

Adds DotNetTestPathType enum and PathType property to DotNetTestSettings to
support explicit --project and --solution parameters required by .NET 10+.

Changes:
- Add DotNetTestPathType enum with None, Auto, Project, and Solution values
- Add PathType property to DotNetTestSettings (defaults to None for backward compatibility)
- Update DotNetTester to handle path type logic with switch expressions
- Add comprehensive unit tests covering all path type scenarios
- Support auto-detection based on file extensions (.sln, .csproj, .vbproj, .fsproj, .vcxproj)

Resolves cake-build#4627
@devlead devlead merged commit 9c605ab into cake-build:develop Oct 24, 2025
17 checks passed
jarlehjortland pushed a commit to WebMed-EPJ/cake that referenced this pull request Oct 31, 2025
(cake-buildGH-4629) Update Verify.XunitV3 to 31.0.4
* fixes cake-build#4629

GH4631: GitHub Actions Workflow Updates (cake-build#4632)

* (cake-buildGH-4631) GitHub Actions Workflow Updates

### Action Version Updates
- `actions/checkout`: v4 → v5
- `actions/setup-dotnet`: v4 → v5
- `cake-build/cake-action`: master → v3.0.1
- CodeQL actions: v2 → v4

### Build Matrix Changes
- **Removed**: `macos-13` (deprecated)
- **Added**: `macos-15-intel` and `macos-latest` runners
- Maintained existing `windows-latest` and `ubuntu-latest`

### CodeQL Improvements
- Added explicit `build-mode: 'autobuild'`
- Added .NET SDK 8.0.x/9.0.x setup steps
- Added `CAKE_INSTALL_SUPPORTED_SDKS: true` env var (to implicit install all SDKs for build script phase)

### New .NET Support
- Added .NET 10.0 validation: `CAKE_NETCOREAPP_10_0_VERSION_OS`

- fixes cake-build#4631

* feat: Improve GitHub Actions integration and test coverage

- Include runner architecture in artifact naming and validation
- Update BuildData record to include Architecture field
- Add .NET 10.0 path validation in integration tests
- Update Cake.Git addin version from 4.0.0 to 5.0.1
- Skip native assembly loading tests on ARM64 runners

* feat: Include runner architecture in GitHub Actions artifact naming

- Add runner architecture to artifact name for better identification
- Ensures unique artifact names across different runner architectures

GH4627: Add explicit path type support for .NET 10+ compatibility (cake-build#4633)

(cake-buildGH-4627) Add explicit path type support for .NET 10+ compatibility

Adds DotNetTestPathType enum and PathType property to DotNetTestSettings to
support explicit --project and --solution parameters required by .NET 10+.

Changes:
- Add DotNetTestPathType enum with None, Auto, Project, and Solution values
- Add PathType property to DotNetTestSettings (defaults to None for backward compatibility)
- Update DotNetTester to handle path type logic with switch expressions
- Add comprehensive unit tests covering all path type scenarios
- Support auto-detection based on file extensions (.sln, .csproj, .vbproj, .fsproj, .vcxproj)

Resolves cake-build#4627

(cake-buildGH-4638) Update Spectre.Console to 0.53.0
- fixes cake-build#4638

cake-buildGH-4639: Enable Spectre.Console report printer by default

Also fixes some bugs with the initial implementation, as well as
making sure that the borders have a safe (non-unicode) fallback.

Closes cake-build#4639

(cake-buildGH-4636) Enhance FileSystem Abstractions & tests

Added timestamps, Unix modes, performance improvements and dedicated for Fake File/Directory.

- Add comprehensive timestamp and Unix file mode support across IFile/IDirectory interfaces
- Implement LastWriteTimeUtc, CreationTimeUtc, LastAccessTimeUtc, and UnixFileMode properties
- Add Set* methods for timestamp and Unix file mode manipulation
- Improve performance by replacing GetFiles/GetDirectories with EnumerateFiles/EnumerateDirectories
- Create dedicated Cake.Testing.Tests project with comprehensive unit test coverage
- Add snapshot testing with Verify for FakeFile and FakeDirectory operations
- Fill gaps in file system abstraction with cross-platform Unix file mode support
- Integrate Microsoft.Extensions.TimeProvider.Testing for reliable time handling in tests
- Refactor FakeDirectory to use yield return for lazy evaluation performance benefits
- Add extensive test coverage for Create, Move, Delete, GetDirectories, and GetFiles operations
- fixes cake-build#4636

### Breaking Changes
- [x] There shouldn't be any breaking changes identified, all new interface members have default implementations / values.

#### IFileSystemInfo Interface (Base interface)
- [x] `DateTime? LastWriteTimeUtc` - Default: `null`
- [x] `DateTime? CreationTimeUtc` - Default: `null`
- [x] `DateTime? LastAccessTimeUtc` - Default: `null`
- [x] `UnixFileMode? UnixFileMode` - Default: `null`

#### IDirectory Interface
- [x] `IDirectory SetCreationTime(DateTime creationTime)` - Default: `return this`
- [x] `IDirectory SetCreationTimeUtc(DateTime creationTimeUtc)` - Default: `return this`
- [x] `IDirectory SetLastAccessTime(DateTime lastAccessTime)` - Default: `return this`
- [x] `IDirectory SetLastAccessTimeUtc(DateTime lastAccessTimeUtc)` - Default: `return this`
- [x] `IDirectory SetLastWriteTime(DateTime lastWriteTime)` - Default: `return this`
- [x] `IDirectory SetLastWriteTimeUtc(DateTime lastWriteTimeUtc)` - Default: `return this`
- [x] `IDirectory SetUnixFileMode(UnixFileMode unixFileMode)` - Default: `return this`

#### IFile Interface
- [x] `IFile SetUnixFileMode(UnixFileMode unixFileMode)` - Default: `return this`

### Key Changes Made
- [x] Added UTC time properties to IFileSystemInfo with default null values
- [x] Added Unix file mode support with UnixFileMode property and setter methods
- [x] Added time setter methods for both IDirectory and IFile interfaces
- [x] Performance improvement: Changed from GetDirectories()/GetFiles() to EnumerateDirectories()/EnumerateFiles()
- [x] Added _file.Refresh() calls after time-setting operations to ensure consistency
- [x] Added platform-specific attributes ([UnsupportedOSPlatform("windows")]) for Unix-specific methods
This was referenced Nov 11, 2025
This was referenced Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET Test Platform Requires --project <PROJECT_PATH> / --solution <SOLUTION_PATH to be specified

1 participant