Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking embedded interops in package reference #2859

Closed
nkolev92 opened this issue Sep 28, 2017 · 1 comment
Closed

Linking embedded interops in package reference #2859

nkolev92 opened this issue Sep 28, 2017 · 1 comment

Comments

@nkolev92
Copy link
Contributor

nkolev92 commented Sep 28, 2017

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

@nkolev92
Copy link
Contributor Author

We have decided to move this responsibility to the package author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant