6

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.

3
  • stackoverflow.com/questions/56697901/… may, or may not, be helpful. Commented Apr 16, 2020 at 0: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 Commented Apr 16, 2020 at 0: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… Commented Oct 12, 2021 at 21:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.