Skip to content

Commit 1a91572

Browse files
authored
ToolManifestFinder detect .slnx (#47512)
1 parent 115ab59 commit 1a91572

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Cli/dotnet/ToolManifest/ToolManifestFinder.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public FilePath FindFirst(bool createIfNotFound = false)
198198
/*
199199
The --create-manifest-if-needed will use the following priority to choose the folder where the tool manifest goes:
200200
1. Walk up the directory tree searching for one that has a.git subfolder
201-
2. Walk up the directory tree searching for one that has a .sln/git file in it
201+
2. Walk up the directory tree searching for one that has a .sln(x)/git file in it
202202
3. Use the current working directory
203203
*/
204204
private DirectoryPath GetDirectoryToCreateToolManifest()
@@ -214,7 +214,7 @@ private DirectoryPath GetDirectoryToCreateToolManifest()
214214
if (currentSearchDirectory.Value.Value != null)
215215
{
216216
if (_fileSystem.Directory.EnumerateFiles(currentSearchDirectory.Value.Value)
217-
.Any(filename => Path.GetExtension(filename).Equals(".sln", StringComparison.OrdinalIgnoreCase))
217+
.Any(filename => Path.GetExtension(filename).Equals(".sln", StringComparison.OrdinalIgnoreCase) || Path.GetExtension(filename).Equals(".slnx", StringComparison.OrdinalIgnoreCase))
218218
|| _fileSystem.File.Exists(currentSearchDirectory.Value.WithFile(".git").Value))
219219

220220
{

0 commit comments

Comments
 (0)