Skip to content

Not able to use net20 library in net461 project #1779

Closed

Description

@simendsjo

Description

I'm having a problem after upgrading Paket to 3.4.0. Our project is net461, and we have framework: net461 at the top of our paket.dependencies. However, we use a package which only exists for net20. We used to have the reference to this project in paket.references, but added a reference to the dll manually. The new version of paket breaks this though. It removes our manually added reference, but does not add a reference to the dll, probably as its net20 and not net461. We tried a workaround by removing it from paket.references and adding it manually, but this breaks on our build server as we're using paket.targets which runs restore directly against the paket.references file and, as we removed the reference, won't download the package. Preferable, we would like paket to add this to our project even though a specific version doesn't exist for net461 (which works automatically for libraries >=net40 it seems). Is there a way to force this behavior? Or other workarounds which doesn't involve changing paket.targets or our build server?

Repro steps

Run paket install in repo https://github.com/simendsjo/paket-net20-library-problem

Expected behavior

net20 library is referenced in net461 project

Actual behavior

net20 library is not referenced

Known workarounds

None

Related information

  • Operating system: Windows 10
  • Paket: 3.4.0
  • .NET: 4.6.1

Activity

  1. forki commented on Jul 1, 2016

    @forki
    Member

    Yesterday someone else reported something similar (but closed it again) . But this is such a basic feature, how could we break it and didn't notice in integration tests? This will be first thing after my vacation.

  2. added a commit that references this issue on Jul 1, 2016
  3. forki commented on Jul 1, 2016

    @forki
    Member

    ok found 5min while packing my stuff for vacation. it seems this case actually never really worked. There is a lot going on (so there is much do to after vacation), but could you please test latest alpha? I think I found the cause and hacked a bit around it.

  4. matthid commented on Jul 10, 2016

    @matthid
    Member

    Problem was that EPPlus has a readme.txt file in the lib folder. The penalty for the "empty" lib folder was not high enough...

  5. forki commented on Jul 11, 2016

    @forki
    Member

    So there is a pr for this?

  6. matthid commented on Jul 11, 2016

    @matthid
    Member

    Currently it is part of #1785 as I was working on that part of the codebase anyway and it was a good test case. Sorry. I think you could cherry pick the last commit if you want to release this (the fix was the increment of the constant). I try to get the PR to a mergable state next week. Figuring out why the build was red just took way too much time :)

  7. matthid commented on Jul 11, 2016

    @matthid
    Member
    • cherry pick the last two commits
  8. forki commented on Jul 12, 2016

    @forki
    Member

    done.

  9. forki commented on Jul 12, 2016

    @forki
    Member

    fixes are in latest alpha. I will create proper release later today

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