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. 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