question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consume NuGet /embed assets group for interop type assemblies from NuGet package

See original GitHub issue

This is the tracking issue to update dotnet build tasks to consume new /embed assets group from NuGet packages for interop type assemblies so that Project System passes it as link instead of ref to compiler.

Corresponding NuGet issue# https://github.com/NuGet/Home/issues/2365

@livarcocc @nguerrera @dsplaisted @rrelyea

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
nkolev92commented, Mar 2, 2023

You need to build it with ImportedFromTypeLib specified. Here’s what we have in one of our projects: https://github.com/NuGet/NuGet.Client/blob/release-5.11.x/src/NuGet.Clients/NuGet.VisualStudio/AssemblyInfo.cs

1reaction
nkolev92commented, Mar 2, 2023

Should packages using this feature put a DLL in both the lib and embed folders? The spec seemed to suggest this, but since the result of the embed folder is that EmbedInteropTypes metadata should be set to true on the compile reference, it seems like maybe the DLL should only go in the embed folder

It seems like the idea with duplicating was for the package to remain compatible with packages.config.

I think with interop the expectation would be that the assembly gets embed into the final assembly and that’s it. It should not be deployed in the runtime folder.

If it’s in both, we will probably need logic in the ResolvePackageAssets task to deduplicate the items, or to match up the embed items with the lib ones.

I feel like this should’ve been dedupped on NuGet side, but it’s ok if it’s done on the RPA side too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create packages with COM interop assemblies
Create NuGet packages that contain COM interop assemblies ... use a combination of your package name and the assembly being embedded, ...
Read more >
Embed Interop Types to false in NuGet package
There's an assembly I need to reference in my project, that needs to have the "Embed Interop Types" set to false in order...
Read more >
Microsoft.VisualStudio.SDK.EmbedInteropTypes 15.0.36
When referencing VS SDK NuGet packages using PackageReference, assemblies are referenced instead of linked. This package corrects that.
Read more >
Conflict between Asset's Newtonsoft and ...
Hey guys, (Unity 2019.3.4f1) So i want to start my new project and i wanted to use Entities in it. I have already...
Read more >
What is NuGet (How it Works for Developers Tutorial)
NuGet enables the production, hosting, and retrieval of packages for .NET Frameworks. Software packages that NuGet manages are called NuGet ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found