Skip to content

System.IO.FileNotFoundException when using PrivateAssets = "All" #933

@KshitizGIT

Description

@KshitizGIT

I have a project layout like this.

Assembly A -> Assembly B -> Assembly C.

Program lives in Assembly A.
ClassB lives in Assembly B.
ClassC lives in Assembly C.

I don't want AssemblyC to be directly accessible in AssemblyA. So I added PrivateAssets = "All" in the ProjectReference element in the AssemblyB.csproj file

ClassB creates a instance of ClassC.

Program creates a instance of ClassB.

But this is causing a System.IO.FileNotFoundException : Couldnot load file or assembly 'C'.

I have attached the project. Please look into it.

Dependency.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions