Skip to content

Commit ee20f89

Browse files
authored
Add support for slnx files (#36)
1 parent c85c9ce commit ee20f89

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dotnet tool install -g dotnet-delice
1717
You can then use it like so:
1818

1919
```
20-
dotnet delice [folder, sln, csproj, fsproj]
20+
dotnet delice [folder, sln, slnx, csproj, fsproj]
2121
```
2222

2323
## Commands
@@ -68,6 +68,10 @@ License Expression: MIT
6868
- Ability to filter for only a particular license
6969
- Anything you'd like? Open an [issue](https://github.com/aaronpowell/dotnet-delice/issues) 😁
7070

71+
# Slnx support
72+
73+
XML-based solution file format (slnx) are supported, but you need at least a `.NET 9.0.201 SDK` which provides support for interacting with these files.
74+
7175
# Undetermined Licenses
7276

7377
At the end of 2018 the [`licenseUrl` field in the nuspec file was deprecated](https://github.com/NuGet/Announcements/issues/32) to be replaced with a richer license metadata field. You can read more about it in the [annuncement](https://github.com/NuGet/Announcements/issues/32), the [documentation](https://docs.microsoft.com/en-us/nuget/reference/nuspec?WT.mc_id=dotnet-0000-aapowell#license) and [Spec wiki](https://github.com/NuGet/Home/wiki/Packaging-License-within-the-nupkg).

src/DotNetDelice/App.fs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ let (|Proj|_|) arg =
1616
String.Compare(str, arg, StringComparison.OrdinalIgnoreCase) = 0
1717

1818
if c ".sln" then Some()
19+
elif c ".slnx" then Some()
1920
elif c ".csproj" then Some()
2021
elif c ".fsproj" then Some()
2122
else None
@@ -28,7 +29,7 @@ let findProject path =
2829
| Proj -> Path.GetFullPath path
2930
| _ -> failwith "Path is not a valid project or solution path"
3031
| (_, true) ->
31-
match Directory.GetFiles(path, "*.sln") with
32+
match Directory.GetFiles(path, "*.sln") |> Array.append <| Directory.GetFiles(path, "*.slnx") with
3233
| [| sln |] -> Path.GetFullPath sln
3334
| [||] ->
3435
match
@@ -87,7 +88,7 @@ let getLicensesForTool checkGitHub token checkLicenseContent (projectSpec: Packa
8788
type Cli() =
8889

8990
[<Argument(0,
90-
Description = "The path to a .sln, .csproj or .fsproj file, or to a directory containing a .NET Core solution/project. If none is specified, the current directory will be used.")>]
91+
Description = "The path to a .sln, .slnx, .csproj or .fsproj file, or to a directory containing a .NET Core solution/project. If none is specified, the current directory will be used.")>]
9192
member val Path = "" with get, set
9293

9394
[<Option(Description = "Output result as JSON")>]

0 commit comments

Comments
 (0)