Skip to content
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

Paket 5.203.2 pulls packages it shouldn't pull -> build fails #3566

Closed
matthid opened this issue May 3, 2019 · 5 comments
Closed

Paket 5.203.2 pulls packages it shouldn't pull -> build fails #3566

matthid opened this issue May 3, 2019 · 5 comments

Comments

@matthid
Copy link
Member

matthid commented May 3, 2019

Description

Just updated paket and now run into a issue similar to #3544 but for a net461 project:

Reference to package System.Runtime.WindowsRuntime is added which causes error The type 'IAsyncOperationWithProgress2' is required here and is unavailable. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'.

This is probably related to #3545 or #3530 (or both)

The following changes make me suspicious in the lockfile:

image

image

I think there is a second bug here, because even considering paket pulling the dependencies (as there might be frameworks which need it) it should filter them when considering a project building for net461. I'm wondering why people are not reporting this issue more often.

Expected behavior

Paket shouldn't think Microsoft.CSharp has dependencies in this situation.

Actual behavior

Paket thinks Microsoft.CSharp has dependencies.

Known workarounds

Downgrade to 5.198.0

@matthid
Copy link
Member Author

matthid commented May 3, 2019

So it seems to be related to the fact that we have a netstandard2.0 project and a net472 project which references the former. The netstandard2.0 project seems to pull the System.Runtime.WindowsRuntime dependency and then the net472 project no longer compiles.

Not sure why the previous fix doesn't work

@matthid
Copy link
Member Author

matthid commented May 6, 2019

I think this might be related to the filtering: I think restriction groups without "framework" are considered "generic" groups which "match everything" (see #3556 (comment)). It feels like this is happening here: We consider the .NETCore 5.0 now as a "fallback" group, which we shouldn't. Maybe there is even something else going on, because that doesn't explain the above changes on the lockfile, but it could explain the overall behavior.

@forki any change to take a look?

@matthid
Copy link
Member Author

matthid commented May 7, 2019

To reproduce run paket update on the following paket.dependencies

version 5.203.2
framework netstandard2.0
source https://api.nuget.org/v3/index.json
nuget Microsoft.CSharp

Now inspect the lockfile and see that paket "thinks" Microsoft.CSharp has dependencies which is shouldn't

@matthid
Copy link
Member Author

matthid commented May 11, 2019

With version 5.206.0 this now creates:

RESTRICTION: == netstandard2.0
NUGET
  remote: https://api.nuget.org/v3/index.json
    Microsoft.CSharp (4.5)

Which is the expected result. Maybe we should add a test for this.

@matthid matthid closed this as completed May 11, 2019
@forki
Copy link
Member

forki commented May 12, 2019 via email

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

No branches or pull requests

2 participants