2

I've got a project setup as follows:

Project B has a dependency on Project A

Project C has a dependency on Project B

I would like Project C to have access to Project A's types transitively. However, in my Project C (.Net Framework 4.8) referencing Project B (.Net Standard 2.0) it can't resolve any types from Project A (.Net Standard 2.0).

My understanding is the new way of doing things transitive project references are enabled by default, yet I can't build Project C without adding a direct reference to Project A as well.

I've tried playing with <IncludeAssets>all</IncludeAssets> and <PrivateAssets>none</PrivateAssets> as well as <DisableTransitiveProjectReferences>false</DisableTransitiveProjectReferences> with no luck.

Michael Brown
  • 1,585
  • 1
  • 22
  • 36
  • https://stackoverflow.com/questions/56697901/why-is-this-nuget-dependency-missing-when-compiling-net-framework-project-depen may, or may not, be helpful. – mjwills Apr 16 '20 at 00:10
  • what about not exposing the types from A to project C...exposing the types might cause problems down the line if you ever want to refactor – Ctznkane525 Apr 16 '20 at 00:34
  • How are you building them? `msbuild` at the CLI? Visual Studio (if so, which projects are in your solution?). `dotnet` CLI commands (which I don’t know how to use)? I expect this to work just fine… – binki Oct 12 '21 at 21:12

0 Answers0