Skip to content

BUG?: update with any of the --keep-?? flags doesn't honour redirects:on in paket.dependencies #1844

Closed

Description

@pms1969

This is pretty much a copy and paste from #1701
and is presumably related.

I haven't been able to create a project that does this outside of work, so I can't send you a repro. I'm sure there's something simple I'm missing, but haven't been able to figure it out. All that is needed is a set of projects that create an assemblybindingredirect under normal conditions, then editing the paket.dependencies file as described in the repro steps.

Description

Not sure if it's a bug, expected behaviour or something else. But if I do a paket update --keep-major when I have specified content:none for a package in paket.dependencies, I end up with the contents being copied to the project folder and the csproj being updated. Running paket update again removes the files as expected.

Repro steps

Please provide the steps required to reproduce the problem

  1. create an empty solution with an bare class library project
  2. paket init
  3. set global redirects:off in paket.dependencies file
  4. paket add nuget project
  5. note the lack of the assembly binding redirect in the app.config
  6. edit paket.dependencies and place redirects:on next to the package name
  7. paket update
  8. note assembly binding redirects have now appeared
  9. paket update --keep-major
  10. note the assembly binding redirects are missing.

Expected behavior

at step 9, the project should not contain the contents of the bootstrap package

Actual behavior

assembly binding redirect gone missing.

Known workarounds

must set the global redirects to on.

Related information

  • Operating system: Windows 7
  • Branch : paket version 2.58.6 and onward. (tested with 2.58.6 and 3.10.0)
  • .NET Runtime, CoreCLR or Mono Version: 4.5
  • Performance information, links to performance testing scripts

Activity

  1. pms1969 commented on Aug 4, 2016

    @pms1969
    ContributorAuthor

    I was just being a dunce. I've managed to get a project that follows the behaviour mentioned
    TestPaket.zip

    if you do a paket update it will add the redirects as expected. if you then do a paket update --keep-major the redirects go missing.

  2. forki commented on Aug 5, 2016

    @forki
    Member

    thanks for reporting and providing a sample
    should be fixed

  3. pms1969 commented on Aug 5, 2016

    @pms1969
    ContributorAuthor

    Works a treat. Thank you. Prompt as always.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions