Skip to content

Need to add plain @(Reference) information to the .deps.json file #322

@eerhardt

Description

@eerhardt

On Desktop projects (and technically .NET Core projects now in the MSBuild world), it is possible to have normal references to assemblies. Specifically references to "Reference Assemblies" in the .NET Framework.

We need to add these assemblies to the .deps.json file. In project.json based projects, for desktop specifically, these kinds of references only got added to "CompilationAssemblies", there were no runtime assets for them, since it assumed the runtime library is already present. Thus they should only be added to the "compile" libraries in the deps.json file.

See https://github.com/dotnet/cli/blob/1278e9d6bf35500e9672fe3f53125df1d08717d8/src/Microsoft.DotNet.ProjectModel/Compilation/LibraryExporter.cs#L389-L402

Also, when we do this, the project.json based CLI would use the relative path from the "Reference Assemblies" folder (C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework) in the path in the .deps.json file. See https://github.com/dotnet/cli/blob/1278e9d6bf35500e9672fe3f53125df1d08717d8/src/Microsoft.DotNet.ProjectModel/DependencyContextBuilder.cs#L221-L238

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