question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependencies node should respect DisableTransitiveProjectReferences

See original GitHub issue

When a project sets property DisableTransitiveProjectReferences to true, the dependencies node should not display transitive project references.

Current

App.csproj

<PropertyGroup>
  <TargetFramework>netcoreapp3.1</TargetFramework>
  <DisableTransitiveProjectReferences>true</DisableTransitiveProjectReferences>
</PropertyGroup>
<ItemGroup>
  <ProjectReference Include="..\ClassLibrary1\ClassLibrary1.csproj" />
</ItemGroup>

ClassLibrary1.csproj

<ItemGroup>
  <ProjectReference Include="..\ClassLibrary2\ClassLibrary2.csproj" />
</ItemGroup>

App’s Dependencies Tree

image

Expected

ClassLibrary2 does not appear as a child dependency of ClassLibrary1 in the App project.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
pzwaracommented, Jun 5, 2020

I would like to use DisableTransitiveProjectReferences to hide implementation\project references\nugets from referenced project and that the dependency of dependency won’t be shown by intellisense in VS. Wasn’t this flag made for it?

By using PrivateAssets = "All" I have System.IO.FileNotFoundException exceptions, because dll’s are not copied. So how can I separate / hide implementation details between different layers of application?

0reactions
drewnoakescommented, May 1, 2020

The tree shows what’s in the assets file. My understanding is that the assets file should not contain the transitively-referenced-project due to DisableTransitiveProjectReferences being true. If that’s so then the fix is to get the assets file to model this correctly, in which case the UI will update automatically.

Read more comments on GitHub >

github_iconTop Results From Across the Web

When Should I Disable Transitive References in C#? - ...
If I set <DisableTransitiveProjectReferences>true</ ... When should I explicitly disable transitive references in a C# project?
Read more >
Untitled
Web11 Sep 2019 · Dependencies node should respect DisableTransitiveProjectReferences dotnet/project-system#5972. mentioned this issue.
Read more >
Do I need to respect licences of dependencies ...
1 Answer. You are required to comply with all the licenses that apply to the different code parts that make up your project,...
Read more >
Unlocking security updates for transitive dependencies ...
With security updates, Dependabot tries to make the most conservative update that removes the vulnerability while respecting version ...
Read more >
.NET Core Transitive Dependencies and how to block them
In this way, the attribute is automatically set for all dependencies of our solution, and we don't need to maintain these references manually....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found