Is it possible to exclude a package's dependencies when it is included in a VS project via PackageReference? I would like to only include the contents of the compile/runtime assets.
In my project I need to add a package for it's functionality but one if its dependencies conflicts with a later version I need to use, supplied by my own project. I don't have access to the package so can't update its dependencies but I know it can work fine with the later version that my project uses. I thought I can use a binding redirect but each time I build my project its random which version of the dependency will show up the output dir so sometimes the new dependency isn't even available to redirect to.
I tried adding IncludeAssets like below but I still see the dependencies downloaded in the .nuget packages foldder.
<PackageReference Include="Package_I_Want_But_Without_Its_Dependencies" Version="1.0.0">
<IncludeAssets>runtime</IncludeAssets>
</PackageReference>
Is there another setting I am missing or is what I am looking for not possible? Perhaps another solution altogether?