Hello everyone. I am trying to understand the .deps.json
file that dotnet publish
creates. Where can I find more information about this?
If I make a random .net project that just contains the dependency DeepCloner
and publishes to osx
and target framework net6.0
, the .deps.json
file lists two versions of many of the runtime dependencies, such as:
...
"targets": {
".NETCoreApp,Version=v6.0": {},
"NETCoreApp,Version=v6.0/osx-arm64": {
"project/1.0.0":{...},
"runtimepack.Microsoft.NETCore.App.Runtime.osx-arm64/6.0.16": {
...
< tons of depdencies, including System.Net.Http assembly version 6.0.0 >
},
...
< but further down in this list we also see: >
"System.Net.Http/4.3.0": {...},
...
< as well as all the other "older" system dependencies that is not a part of net6.0 >
}
...
But the published artifact only contains the .dll
for System.Net.Http
version 6.0.0
(which makes sense given the target framework)
So what's the deal with listing all those that for sure is not a part of the published artifact?
How can I somehow get a "true" list of dependencies related to my specific framework and RID?
Doing a dotnet list
does not show this, only the literal dependencies in the tree, not the actual, resolved versions.
Thanks in advance.