Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Publish removes assemblies that aren't listed in references #2419

Closed
glennc opened this issue Aug 5, 2015 · 5 comments
Closed

Publish removes assemblies that aren't listed in references #2419

glennc opened this issue Aug 5, 2015 · 5 comments
Assignees
Milestone

Comments

@glennc
Copy link
Member

glennc commented Aug 5, 2015

The ServiceFabric.Data package (https://www.nuget.org/packages/Microsoft.ServiceFabric.Data/) contains several assemblies, only one of which is listed in the references section of the NuSpec.

This is deliberate on their part and is an attempt to provide a single assembly to use that then has some helper assemblies.

Currently when you publish an application that has a package of this type we copy all the assemblies into the output, but then just as publish is ending we delete the assemblies that are not listed in references.

This stops the ServiceFabric.Data package, and any others that do the same thing, from working.

@davidfowl
Copy link
Member

This must be a general issue with restore then? What does the lock file entry have for this package? Does it list all of the assemblies

@analogrelay
Copy link
Contributor

The problem is that we use the References section to filter both runtime and compile. To mirror NuGet 2's behavior, it should only filter compile, since the purpose of filtering out these assemblies is to avoid compiling against them, but to have them present at runtime.

@analogrelay
Copy link
Contributor

see src\microsoft.dnx.tooling\utils\lockfileutils.cs:174

@ChengTian
Copy link
Contributor

Thanks for pinpointing the location in code. Just sent a PR for it.

@analogrelay
Copy link
Contributor

👍

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

No branches or pull requests

4 participants