Azure / azure-service-bus-dotnet

☁️ .NET Standard client library for Azure Service Bus
https://azure.microsoft.com/services/service-bus
Other
235 stars 120 forks source link

Cannot install Nuget package for Service Fabric Project #427

Open corogers-msft opened 6 years ago

corogers-msft commented 6 years ago

Actual Behavior

  1. Create Service Fabric project in VS 2017 (Stateful or Stateless) with .NET Core 2.0
  2. Install Microsoft.Azure.Servicebus
  3. It will error on trying to install Microsoft.Net.Websockets 4.0.0

Expected Behavior

I would hope that this would just work and I can avoid using the WindowsAzure.Servicebus since it seems this package is the more recent one that will be supported going forward.

Please let me know if I'm missing something obvious about Service Fabric projects that prevent Microsoft.Azure.Servicebus from being installed for them. There are examples of Service Fabric and WindowsAzure.Servicebus working so I don't think it should be an issue?

Versions

corogers-msft commented 6 years ago

Turns out the error we were getting was: Restoring packages for C:\Users\corogers\source\repos\Application2\Stateful1\Stateful1.csproj... Detected package downgrade: Microsoft.Win32.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.

Stateful1 -> Microsoft.Azure.ServiceBus 2.0.0 -> Microsoft.Azure.Amqp 2.1.2 -> System.Net.WebSockets.Client 4.0.0 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> Microsoft.Win32.Primitives (>= 4.3.0)

Stateful1 -> Microsoft.Azure.ServiceBus 2.0.0 -> Microsoft.Azure.Amqp 2.1.2 -> System.Net.WebSockets.Client 4.0.0 -> Microsoft.Win32.Primitives (>= 4.0.1) Package restore failed. Rolling back package changes for 'Stateful1'. Time Elapsed: 00:00:00.6335362 ========== Finished ==========

And that all we needed to do was install the Microsoft.Win32.Primitives Nuget version 4.3.0 before trying to get the Nuget package for Microsoft.Azure.ServiceBus.

Hopefully this will not be an issue for the next release, in that that specific package will be upgraded?