-
Notifications
You must be signed in to change notification settings - Fork 258
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
PackageReference to embeddable interop package *references* the assembly instead of *linking* it #10188
Comments
Hey @AArnott, Unfortunately the consumption side of PackageReference + embed is not implemented in either SDK or legacy build targets. Related issue:
This was a feature completed in early 2019, #2365 in NuGet 5.0, but while the NuGet side was done, the SDK/project-system parts were not. We need to have someone drive the partner side to completion. |
Thanks. Would that be someone on the nuget team that should drive this? It seems like a significant amount of work has already been done on the nuget team, but if it isn't seen through to completion, I'm afraid the spec and closed issue make it look like it should work when it doesn't. I can perhaps help ping folks to look at those issues, but I certainly have no expertise with the nuget targets/tasks that would be required to get this to work on the consumption side. |
Yes, I think so. The feature is NuGet driven, even if we don't own the codepaths in question.
I agree, that's very unfortunate. I'll bring this up at our next triage meeting(Thursday, 10/29) and add the outcome here. |
It's on my plate now. I'm gonna try to complete over the next 2 sprints in time for 16.9. |
Per Embed Interop Types with PackageReference and #2365, the recommended pattern for packages that carry embeddable interop assemblies is to construct the package in both
lib\
andembed\
folders.Details about Problem
dotnet.exe --version (if appropriate): 5.0.100-rc.2.20479.15
Detailed repro steps so we can see the same problem
Given a NuGet package that contains an interop assembly under both lib and embed folders, add a
PackageReference
to it from a .NET SDK style project.EXPECT
I expect the C# compiler to be invoked with the interop assembly specified with a
/link:interop.dll
switch.ACTUAL
The C# compiler is invoked with
/reference:interop.dll
.This is the same behavior as if the package didn't use the
embed
pattern at all.I do observe that the project.assets.json file does recognize the embed folder:
But msbuild still references the dll instead of linking in.
Other suggested things
Verbose Logs
See msbuild.binlog.
Sample Project
sdktest.zip
The text was updated successfully, but these errors were encountered: