From 1b390c232fc8819f4a88e7a5488696a675e1dc35 Mon Sep 17 00:00:00 2001 From: Carlos D Date: Mon, 2 Feb 2026 11:06:58 +1100 Subject: [PATCH 1/2] Support slnx files to for dotnet-sln project types The extension `slnx` is an atlernative file type to `sln` to describe dotnet solution projects, see: https://devblogs.microsoft.com/dotnet/introducing-slnx-support-dotnet-cli/ Support `slnx` projects in the same way as `sln` projects, by checking that a file exists with the relevant file extension. --- projectile.el | 5 +++-- test/projectile-test.el | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/projectile.el b/projectile.el index 5d8ce401..0160feb3 100644 --- a/projectile.el +++ b/projectile.el @@ -3148,7 +3148,8 @@ it acts on the current project." "Check if a project contains a .NET solution project marker. When DIR is specified it checks DIR's project, otherwise it acts on the current project." - (or (projectile-verify-file-wildcard "?*.sln" dir))) + (or (projectile-verify-file-wildcard "?*.sln" dir) + (projectile-verify-file-wildcard "?*.slnx" dir))) (defun projectile-go-project-p (&optional dir) "Check if a project contains Go source files. @@ -3372,7 +3373,7 @@ a manual COMMAND-TYPE command is created with :run "dotnet run" :test "dotnet test") (projectile-register-project-type 'dotnet-sln #'projectile-dotnet-sln-project-p - :project-file "?*.sln" + :project-file '("?*.sln" "?*.slnx") :compile "dotnet build" :run "dotnet run" :test "dotnet test") diff --git a/test/projectile-test.el b/test/projectile-test.el index 4ebe3bd9..886766af 100644 --- a/test/projectile-test.el +++ b/test/projectile-test.el @@ -1377,6 +1377,14 @@ Just delegates OPERATION and ARGS for all operations except for`shell-command`'. (let ((projectile-indexing-method 'native)) (spy-on 'projectile-project-root :and-return-value (file-truename (expand-file-name "project/"))) (expect (projectile-detect-project-type) :to-equal 'dotnet-sln))))) + (it "detects project-type for dotnet slnx projects" + (projectile-test-with-sandbox + (projectile-test-with-files + ("project/" + "project/Project.slnx") + (let ((projectile-indexing-method 'native)) + (spy-on 'projectile-project-root :and-return-value (file-truename (expand-file-name "project/"))) + (expect (projectile-detect-project-type) :to-equal 'dotnet-sln))))) (it "detects project-type for Julia PkgTemplates.jl projects" (projectile-test-with-sandbox (projectile-test-with-files From 36f0d8e74f3a541a459bc68d4b134e6f5be75928 Mon Sep 17 00:00:00 2001 From: Carlos D Date: Mon, 2 Feb 2026 11:10:52 +1100 Subject: [PATCH 2/2] Update changelog for changes to dotnet/slnx --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bf6b765..cee27cb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Changes +* [#1971](https://github.com/bbatsov/projectile/pull/1971): Support `slnx` files for dotnet project types. * [#1958](https://github.com/bbatsov/projectile/issues/1958): Exclude `.projectile-cache.eld` from search results (ripgrep/ag/grep) by default. * [#1957](https://github.com/bbatsov/projectile/pull/1957): Add `:caller` information to calls to `ivy-read` (used by packages like `ivy-rich`). * [#1947](https://github.com/bbatsov/projectile/issues/1947): `projectile-project-name` should be marked as safe.