1
2
 
 
3
4
.NET 11 Preview 6 is now available! (devblogs.microsoft.com)
submitted 1 week ago by to c/dotnet@programming.dev
5
6
 
 

When using Central Package Management (Directory.Packages.props holds package versions), package version declarations can remain after package references have been removed. The package versions are unused and misleading.

dotnet nuget why can be used to get a dependency tree across projects to answer how a package comes into the dependency tree. However, the extensive tree list result for a list of version declarations is not viable to simply determine what 'is in use' and what isn't.

I am sharing my Nushell snippet which answers the question of what is declared but not referenced:

# List Directory.Packages.props version declarations that are in no csproj
def "dotnet unused-dirpackprops" [] {
  let defs = open Directory.Packages.props | from xml | get content | where tag == ItemGroup | get content.attributes.Include | flatten | sort --ignore-case --natural
  let refs = ls **/*.csproj | get name | each { open | from xml | get content | select content | flatten | flatten | where tag == PackageReference | get attributes.Include } | flatten | uniq | sort --ignore-case --natural
  $defs | difference $refs
}
❯ dotnet unused-dirpackprops
╭───┬─────────────────────────────────────────╮
│ 0 │ coverlet.collector                      │
│ 1 │ System.Net.Http                         │
│ 2 │ System.ServiceProcess.ServiceController │
╰───┴─────────────────────────────────────────╯

Gaps: In this simple form, only covers the standard csproj package references. Package references included during build through other target or prop files are not covered (probably irrelevant for most users).

7
submitted 2 weeks ago by to c/dotnet@programming.dev
8
9
10
11
.NET 11 Preview 5 is now available! (devblogs.microsoft.com)
submitted 1 month ago by to c/dotnet@programming.dev
12
13
14
15
Deprecating dotMemory Unit (blog.jetbrains.com)
submitted 1 month ago by to c/dotnet@programming.dev
16
17
18
Process API Improvements in .NET 11 (devblogs.microsoft.com)
submitted 2 months ago by to c/dotnet@programming.dev
19
20
 
 

I wrote a blog post about me getting in to FSharp web application development, but am having issues deciding how I want the data access to look. I'm very much open to feedback!

21
22
23
What's new for .NET in Ubuntu 26.04 (devblogs.microsoft.com)
submitted 3 months ago by to c/dotnet@programming.dev
24
submitted 3 months ago by to c/dotnet@programming.dev
25
view more: next ›