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

`copy_local: false` has no effect in paket.references (.NET SDK) #3186

Closed
nightroman opened this Issue May 6, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@nightroman

nightroman commented May 6, 2018

The issue is related to the recently resolved #3154

Use the same steps for reproducing the problem with one change:

  • do not use copy_local: false in paket.dependencies
  • instead, in paket.references use Suave copy_local: false

Expected result

On building the project Suave.dll is not copied to the output directory.

Actual result

Suave.dll is copied to the output directory.

@atlemann

This comment has been minimized.

Show comment
Hide comment
@atlemann

atlemann Sep 7, 2018

Contributor

I also have this problem. I have tried fiddling with paket.restore.targets, but I cannot make it work. I also cannot find any good documentation on what exactly the options for ExcludeAssets and PrivateAssets mean, and which of those that replaces the old copy local/private flag.

Contributor

atlemann commented Sep 7, 2018

I also have this problem. I have tried fiddling with paket.restore.targets, but I cannot make it work. I also cannot find any good documentation on what exactly the options for ExcludeAssets and PrivateAssets mean, and which of those that replaces the old copy local/private flag.

@atlemann

This comment has been minimized.

Show comment
Hide comment
@atlemann

atlemann Sep 7, 2018

Contributor

Seems like the <ExcludeAssets>runtime</ExcludeAssets> tag is not inserted into the obj/{project.file}.paket.props file even though the obj/{project.file}.%(Identity).paket.resolved says exclude in for the NuGets marked with copy_local.

Contributor

atlemann commented Sep 7, 2018

Seems like the <ExcludeAssets>runtime</ExcludeAssets> tag is not inserted into the obj/{project.file}.paket.props file even though the obj/{project.file}.%(Identity).paket.resolved says exclude in for the NuGets marked with copy_local.

@atlemann

This comment has been minimized.

Show comment
Hide comment
@atlemann

atlemann Sep 7, 2018

Contributor

The problem I have is using VS2017. It breaks this when it opens the project and generates all the obj folder contents.

Contributor

atlemann commented Sep 7, 2018

The problem I have is using VS2017. It breaks this when it opens the project and generates all the obj folder contents.

@atlemann

This comment has been minimized.

Show comment
Hide comment
@atlemann

atlemann Sep 7, 2018

Contributor

The difference between setting copy_local: false in paket.dependencies and paket.references you can see in the generated {projectfilename}.paket.net462.resolved file in the obj folder:

  • set copy_local: false in paket.dependencies:
    FSharp.Core,4.5.2,Transitive,Main,exclude
    Suave,2.4.3,Direct,Main,exclude

  • set copy_local: false in paket.references:
    FSharp.Core,4.5.2,Transitive,Main,false
    Suave,2.4.3,Direct,Main,false

I would think that both should end up with exclude as the last element.

Contributor

atlemann commented Sep 7, 2018

The difference between setting copy_local: false in paket.dependencies and paket.references you can see in the generated {projectfilename}.paket.net462.resolved file in the obj folder:

  • set copy_local: false in paket.dependencies:
    FSharp.Core,4.5.2,Transitive,Main,exclude
    Suave,2.4.3,Direct,Main,exclude

  • set copy_local: false in paket.references:
    FSharp.Core,4.5.2,Transitive,Main,false
    Suave,2.4.3,Direct,Main,false

I would think that both should end up with exclude as the last element.

@atlemann

This comment has been minimized.

Show comment
Hide comment
@atlemann

atlemann Sep 7, 2018

Contributor

Seems like it's hard-coded to be copy_local: true in the references files (the 4th argument):

this.AddNuGetReference(groupName, packageName, false, true, true, true, ExplicitRestriction FrameworkRestriction.NoRestriction, false, false, false, None, null)

Although it does parse the references file first with copy_local settings and all. So not sure when this is called yet. Have to read more of the code first.

Contributor

atlemann commented Sep 7, 2018

Seems like it's hard-coded to be copy_local: true in the references files (the 4th argument):

this.AddNuGetReference(groupName, packageName, false, true, true, true, ExplicitRestriction FrameworkRestriction.NoRestriction, false, false, false, None, null)

Although it does parse the references file first with copy_local settings and all. So not sure when this is called yet. Have to read more of the code first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment