fsprojects / Paket

A dependency manager for .NET with support for NuGet packages and Git repositories.
https://fsprojects.github.io/Paket/
MIT License
2.02k stars 525 forks source link

Paket generating package version outside of dependency constraint #2976

Open pshrosbree opened 6 years ago

pshrosbree commented 6 years ago

Description

When executing msbuild /t:Restore I get the the following error:

C:\src\appcenter.petshr\analytics-eventhubreader\src\svc\EventHubReader.Watchdog\EventHubReader.Watchdog.csproj : error NU1608: Detected package version outside of dependency constraint: Microsoft.Data.Services.Client 5.8.2 requires Microsoft.Data.OData (= 5.8.2) but version Microsoft.Data.OData 5.8.3 was resolved. [C:\src\appcenter.petshr\analytics-eventhubreader\analytics-eventhubreader.sln]

But Paket seems to resolving Microsoft.Data.Services.Client 5.8.3

λ  .\.paket\paket.exe why Microsoft.Data.Services.Client --details
Paket version 5.129.2
NuGet Microsoft.Data.Services.Client - 5.8.3 is a transitive dependency.
It is part of following dependency chains:

-> WindowsAzure.Storage - 8.7
  -> Microsoft.Data.Services.Client - 5.8.3 - (>= 5.8.2) (|| (== net461) (&& (== netstandard2.0) (>= net45)))
λ  .\.paket\paket.exe why Microsoft.Data.OData --details
Paket version 5.129.2
NuGet Microsoft.Data.OData - 5.8.3 is a transitive dependency.
It is part of following dependency chains:

-> WindowsAzure.Storage - 8.7
  -> Microsoft.Data.OData - 5.8.3 - (>= 5.8.2)

-> WindowsAzure.Storage - 8.7
  -> Microsoft.Data.Services.Client - 5.8.3
    -> Microsoft.Data.OData - 5.8.3 - (5.8.3)

Nothing I can see is resolving Microsoft.Data.OData 5.8.2.

What is going on here?

paket.dependencies contains this:

framework: net461, netstandard2.0

source https://api.nuget.org/v3/index.json
source https://mseng.pkgs.visualstudio.com/_packaging/Analytics/nuget/v3/index.json

nuget AMQPNetLite
nuget App.Metrics.Extensions.Reporting.InfluxDB
nuget App.Metrics.Formatters.InfluxDB
nuget Autofac.Extensions.DependencyInjection
nuget Autofac.ServiceFabric
nuget AutoFixture.AutoNSubstitute
nuget AutoFixture.Xunit2
nuget Bond.Compiler.CSharp
clitool dotnet-xunit
nuget FluentAssertions
nuget Humanizer.Core
nuget JetBrains.Annotations
nuget LanguageExt.Core
nuget MathNet.Numerics.Signed
nuget Microsoft.Azure.KeyVault
nuget Microsoft.Azure.Management.Compute
nuget Microsoft.Azure.Management.Dns >= 2.0.0-preview
nuget Microsoft.Azure.Management.EventHub
nuget Microsoft.Azure.Management.ResourceManager >= 1.6.0-preview
nuget Microsoft.Azure.Management.Scheduler
nuget Microsoft.Azure.Management.ServiceBus
nuget Microsoft.Azure.Management.ServiceFabric >= 1.0.1-preview
nuget Microsoft.Azure.Management.Sql >= 1.10.0-preview
nuget Microsoft.Azure.Management.Storage >= 7.1.0-preview
nuget Microsoft.Azure.Management.StreamAnalytics
nuget Microsoft.Azure.Management.TrafficManager >= 2.3.0-preview
nuget Microsoft.Azure.Management.WebSites >= 1.7.1-preview
nuget Microsoft.Azure.ServiceBus
nuget Microsoft.Cloud.InstrumentationFramework == 3.0.6.43-preview
nuget Microsoft.Hadoop.Avro2
nuget Microsoft.IdentityModel.Clients.ActiveDirectory
nuget Microsoft.IO.RecyclableMemoryStream
nuget Microsoft.NET.Test.Sdk
nuget Microsoft.Reactive.Testing
nuget Microsoft.VisualStudio.Azure.Fabric.MSBuild 1.6.3 version_in_path: true
nuget Nerdbank.GitVersioning
nuget Polly
nuget Serilog.Extensions.Logging
nuget Serilog.Sinks.Seq
nuget System.Interactive.Async.Providers
nuget System.Interactive.Providers
nuget System.Reactive.Providers
nuget System.Threading.Tasks.Dataflow
nuget WindowsAzure.Storage
nuget xunit
nuget xunit.runner.visualstudio version_in_path: true

Repro steps

Please provide the steps required to reproduce the problem

  1. Step A

  2. Step B

If possible then please create a git repository with a repro sample or attach a zip to the issue.

Expected behavior

Please provide a description of the behavior you expect.

Actual behavior

Please provide a description of the actual behavior you observe.

Known workarounds

Please provide a description of any known workarounds.

forki commented 6 years ago

Looks like nuget is doing something weird and not paket related. Can you please create a minimal repro and upload as zip? I will then verify and check with nuget team

Am 11.01.2018 00:34 schrieb "Peter Shrosbree" notifications@github.com:

Description

When executing msbuild /t:Restore I get the the following error: C:\src\appcenter.petshr\analytics-eventhubreader\src\ svc\EventHubReader.Watchdog\EventHubReader.Watchdog.csproj : error NU1608: Detected package version outside of dependency constraint: Microsoft.Data.Services.Client 5.8.2 requires Microsoft.Data.OData (= 5.8.2) but version Microsoft.Data.OData 5.8.3 was resolved. [C:\src\appcenter.petshr\analytics-eventhubreader\ analytics-eventhubreader.sln]

But Paket seems to resolving Microsoft.Data.Services.Client 5.8.3

λ ..paket\paket.exe why Microsoft.Data.Services.Client --details Paket version 5.129.2 NuGet Microsoft.Data.Services.Client - 5.8.3 is a transitive dependency. It is part of following dependency chains:

-> WindowsAzure.Storage - 8.7 -> Microsoft.Data.Services.Client - 5.8.3 - (>= 5.8.2) (|| (== net461) (&& (== netstandard2.0) (>= net45)))

λ ..paket\paket.exe why Microsoft.Data.OData --details Paket version 5.129.2 NuGet Microsoft.Data.OData - 5.8.3 is a transitive dependency. It is part of following dependency chains:

-> WindowsAzure.Storage - 8.7 -> Microsoft.Data.OData - 5.8.3 - (>= 5.8.2)

-> WindowsAzure.Storage - 8.7 -> Microsoft.Data.Services.Client - 5.8.3 -> Microsoft.Data.OData - 5.8.3 - (5.8.3)

Nothing I can see is resolving Microsoft.Data.OData 5.8.2.

What is going on here?

paket.dependencies contains this:

framework: net461, netstandard2.0

source https://api.nuget.org/v3/index.json source https://mseng.pkgs.visualstudio.com/_packaging/Analytics/nuget/v3/index.json

nuget AMQPNetLite nuget App.Metrics.Extensions.Reporting.InfluxDB nuget App.Metrics.Formatters.InfluxDB nuget Autofac.Extensions.DependencyInjection nuget Autofac.ServiceFabric nuget AutoFixture.AutoNSubstitute nuget AutoFixture.Xunit2 nuget Bond.Compiler.CSharp clitool dotnet-xunit nuget FluentAssertions nuget Humanizer.Core nuget JetBrains.Annotations nuget LanguageExt.Core nuget MathNet.Numerics.Signed nuget Microsoft.Azure.KeyVault nuget Microsoft.Azure.Management.Compute nuget Microsoft.Azure.Management.Dns >= 2.0.0-preview nuget Microsoft.Azure.Management.EventHub nuget Microsoft.Azure.Management.ResourceManager >= 1.6.0-preview nuget Microsoft.Azure.Management.Scheduler nuget Microsoft.Azure.Management.ServiceBus nuget Microsoft.Azure.Management.ServiceFabric >= 1.0.1-preview nuget Microsoft.Azure.Management.Sql >= 1.10.0-preview nuget Microsoft.Azure.Management.Storage >= 7.1.0-preview nuget Microsoft.Azure.Management.StreamAnalytics nuget Microsoft.Azure.Management.TrafficManager >= 2.3.0-preview nuget Microsoft.Azure.Management.WebSites >= 1.7.1-preview nuget Microsoft.Azure.ServiceBus nuget Microsoft.Cloud.InstrumentationFramework == 3.0.6.43-preview nuget Microsoft.Hadoop.Avro2 nuget Microsoft.IdentityModel.Clients.ActiveDirectory nuget Microsoft.IO.RecyclableMemoryStream nuget Microsoft.NET.Test.Sdk nuget Microsoft.Reactive.Testing nuget Microsoft.VisualStudio.Azure.Fabric.MSBuild 1.6.3 version_in_path: true nuget Nerdbank.GitVersioning nuget Polly nuget Serilog.Extensions.Logging nuget Serilog.Sinks.Seq nuget System.Interactive.Async.Providers nuget System.Interactive.Providers nuget System.Reactive.Providers nuget System.Threading.Tasks.Dataflow nuget WindowsAzure.Storage nuget xunit nuget xunit.runner.visualstudio version_in_path: true

Repro steps

Please provide the steps required to reproduce the problem

1.

Step A 2.

Step B

If possible then please create a git repository with a repro sample or attach a zip to the issue. Expected behavior

Please provide a description of the behavior you expect. Actual behavior

Please provide a description of the actual behavior you observe. Known workarounds

Please provide a description of any known workarounds.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/2976, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNGjmjYEUjg0VZj_TgkyOzy24ZzUvks5tJUkBgaJpZM4RaGvW .

pshrosbree commented 6 years ago

@forki I have attached a repro that output the following from msbuild /t:Restore:

"C:\src\appcenter.petshr\analytics-eventhubreader\analytics-eventhubreader.sln" (Restore target) (1) ->
(Restore target) ->
  C:\src\appcenter.petshr\analytics-eventhubreader\src\svc\EventHubReader\EventHubReader.csproj : error NU1608: Detected package version outside of dependency constraint: Microsoft.Data.Services.Client 5.8.2 requires Microsoft.Data.OData (= 5.8.2) but version Microsoft.Data.OData 5.8.3 was resolved. [C:\src\appcenter.petshr\analytics-eventhubreader\analytics-eventhubrea
der.sln]
  C:\src\appcenter.petshr\analytics-eventhubreader\src\svc\EventHubReader.Watchdog\EventHubReader.Watchdog.csproj : error NU1608: Detected package version outside of dependency constraint: Microsoft.Data.Services.Client 5.8.2 requires Microsoft.Data.OData (= 5.8.2) but version Microsoft.Data.OData 5.8.3 was resolved. [C:\src\appcenter.petshr\analytics-eventhubreader\ana
lytics-eventhubreader.sln]
  C:\src\appcenter.petshr\analytics-eventhubreader\src\svc\EventHubReader.Factory\EventHubReader.Factory.csproj : error NU1608: Detected package version outside of dependency constraint: Microsoft.Data.Services.Client 5.8.2 requires Microsoft.Data.OData (= 5.8.2) but version Microsoft.Data.OData 5.8.3 was resolved. [C:\src\appcenter.petshr\analytics-eventhubreader\analy
tics-eventhubreader.sln]

Note, that this contains a .sfproj, which I edited to include Paket.Restore.targets, but you still need to download packages before you execute restore, otherwise the restore on the .sfproj fails.

analytics-eventhubreader.zip

forki commented 6 years ago

this thing is HUUUUGE - It will take a long time for me to analyze that!? Can you please try to find a minimal repro?

pshrosbree commented 6 years ago

Fair enough. I'll trim it, but it may have to wait until end of day.

pshrosbree commented 6 years ago

@forki I have attached a smaller repro

analytics-eventhubreader.zip

forki commented 6 years ago

wow I have seriously no idea where nuget is drawing Microsoft.Data.Services.Client 5.8.2 from

forki commented 6 years ago

BUT: if you add Microsoft.Data.Services.Client to paket.references in EventHubReader.Factory and AppCenter.EventHubs it works as workaround

forki commented 6 years ago

I think this is actually a bug in dotnet cli - but need to investigate further

pshrosbree commented 6 years ago

Thanks @forki . I have been using that workaround. I'd be interested to know if you find anything.

forki commented 6 years ago

Yes will dig deeper tomorrow. I have very weird feelings about this case.

Am 18.01.2018 20:03 schrieb "Peter Shrosbree" notifications@github.com:

Thanks @forki https://github.com/forki . I have been using that workaround. I'd be interested to know if you find anything.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/2976#issuecomment-358748427, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNH4rMjnFr2YfA3OAc-xdqgTr6faKks5tL5WfgaJpZM4RaGvW .

forki commented 6 years ago

@pshrosbree I finally found time to report it: https://github.com/NuGet/Home/issues/6563