KEMBAR78
Linking embedded interops in package reference · Issue #2859 · dotnet/project-system · GitHub
Skip to content

Linking embedded interops in package reference  #2859

@nkolev92

Description

@nkolev92

In the packages.config case, when adding a package NuGet would walk through the compatible references and call VSLangProj.References.Add(assemblyPath).

There, project system would figure out if it's an interop assembly and set true.

Now in package reference, we don't add the references through project system, so interop dlls are referenced the same way as the others instead of linked.

Example assets file:

      "TestR/1.2.5": {
        "type": "package",
        "dependencies": {
          "Newtonsoft.Json": "10.0.2"
        },
        "compile": {
          "lib/net452/Interop.UIAutomationClient.dll": {},
          "lib/net452/TestR.dll": {}
        },
        "runtime": {
          "lib/net452/Interop.UIAutomationClient.dll": {},
          "lib/net452/TestR.dll": {}
        }
      }

We'd prefer to solve this linking without impacting package authors.

We can't really rely on PS in VS because then restoring from commandline would be different from VS.

One idea would be to update the NuGet Build targets to do a sniff test for dlls that need to be linked.

Related to NuGet/Home#2365

//cc
@rrelyea @natidea @davkean @tmeschter

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