Read a .csproj or Directory.Packages.props: what each PackageReference version really permits, target frameworks, and central package management.
Waiting for a .csproj
Nothing is uploaded. Paste the file, or load an example.
In NuGet a bare version is a floor, not a pin. Version="6.0.1" permits 6.4.0; only Version="[6.0.1]" fixes it. That is the reverse of npm and Cargo, and it is why a .NET restore can quietly move a package your file appears to have pinned.
Paste a .csproj to see what it declares and how far each dependency can move.
This reads one file. MSBuild resolves imports, Directory.Build.props, conditions and globbing at build time, and none of that happens here — so a property or package defined elsewhere in the tree is invisible. Nothing is restored and no feed is contacted, so a version that does not exist will still be reported as declared.
.NET Project File Inspector runs entirely on your device — your project file is parsed in your browser and nothing is sent to NuGet
You’re on the Free plan. Compare plans
NuGet's constraint semantics are the reverse of what most developers expect. Version="6.0.1" is a minimum, not a pin: NuGet is free to resolve 6.4.0. Only the bracket form, Version="[6.0.1]", fixes it. That is the opposite of npm and Cargo, and it is why a .NET restore can quietly move a package whose version looks nailed down.
A versionless PackageReference is either correct or fatal and nothing in between. Under central package management it is right, with the version coming from Directory.Packages.props — and a version written in the project as well is an error rather than an override. Without central management the same line fails restore. So the file kind is determined before those lines are judged.
PrivateAssets="all" is .NET's equivalent of Gradle's implementation: the dependency does not flow to consumers of your package. Getting it wrong makes a build tool or an analyser into a transitive runtime dependency for everyone who installs you.
No. It is a minimum, and NuGet may resolve any higher version that satisfies the rest of the graph. Version="[6.0.1]" is the exact pin, and the lock file is what makes a restore reproducible.
Under central package management, where ManagePackageVersionsCentrally is true and the version lives in Directory.Packages.props. Outside that, restore fails — and in a project using central management, adding a version back is an error rather than an override.
It stops the dependency flowing to consumers of your package. Analysers, source generators and build-time tools belong behind it; forgetting it makes them a transitive dependency of everyone who installs your package.
No. MSBuild merges Directory.Build.props, evaluates conditions and expands globs at build time. This reads the file in front of it, which is the part you edit.
No feed is contacted, so a version that was never published is reported exactly as the file declares it. Nothing is restored.
If a tool here saved you some time, you can put something towards the hosting.Buy me a coffee, on Ko-fi, opens in a new tab