Skip to content

Marking project references as PrivateAssets="compile" doesn't work as expected #2304

@davidfowl

Description

@davidfowl

Trying to answer this question dotnet/standard#755 I wrote a sample app that has a console app and 2 class libraries:

App -> Lib1 -> Lib2

I then tried to mark the project reference between Lib1 and Lib2 as PrivateAssets="Compile" to see if it would work and it turns out the IDE works like a charm, but building the App fails like this:

Cannot find project info for 'C:\Users\dfowler\source\repos\ConsoleApp6\ClassLibrary2\ClassLibrary2.csproj'. This can indicate a missing project reference. | ConsoleApp6 | C:\Program Files\dotnet\sdk\2.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets | 128 |  

Is this supposed to work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions