microsoft / ApplicationInsights-ServiceFabric

ApplicationInsights SDK for ServiceFabric projects
MIT License
63 stars 26 forks source link

Unable to install Microsoft.ApplicationInsights.ServiceFabric.Native package #79

Closed ifle closed 6 years ago

ifle commented 6 years ago

I try to install the Microsoft.ApplicationInsights.ServiceFabric.Native package to .NET 4.7.1 Stateless application without any success. I have following error

NU1608: Detected package version outside of dependency constraint: Microsoft.ServiceFabric.Services.Remoting 3.0.467 requires Microsoft.ServiceFabric.Services (= 3.0.467) but version Microsoft.ServiceFabric.Services 3.2.162 was resolved.
NU1608: Detected package version outside of dependency constraint: Microsoft.ServiceFabric.FabricTransport.Internal 3.0.467 requires Microsoft.ServiceFabric (= 6.1.467) but version Microsoft.ServiceFabric 6.3.162 was resolved.
NU1107: Version conflict detected for Microsoft.ServiceFabric.Diagnostics.Internal. Reference the package directly from the project to resolve this issue. 
 Test.Server.Host.ServiceFabric -> Microsoft.ServiceFabric.Services 3.2.162 -> Microsoft.ServiceFabric.Diagnostics.Internal (= 3.2.162) 
 Test.Server.Host.ServiceFabric -> Microsoft.ApplicationInsights.ServiceFabric.Native 2.1.1 -> Microsoft.ServiceFabric.Services.Remoting 3.0.467 -> Microsoft.ServiceFabric.Diagnostics.Internal (= 3.0.467).
Package restore failed. Rolling back package changes for 'Test.Server.Host.ServiceFabric'.
yantang-msft commented 6 years ago

I think it is the problem with our nuget package's dependency requirement, i.e, we should allow higher version of SF packages as the dependency. I'll check it real quick and fix accordingly.

ifle commented 6 years ago

Thanks

yantang-msft commented 6 years ago

@ifle It turns that we are not requiring the exact dependency version match, but it's rather this one Microsoft.ServiceFabric.Services.Remoting. Could you try reference Microsoft.ServiceFabric.Services.Remoting 3.2.162 in your packages.config? It should solve the problem.

ifle commented 6 years ago

I will try to add the Microsoft.ServiceFabric.Services.Remoting first. Thanks.

ifle commented 6 years ago

I checked. Your solution is works. Thanks

hemantkathuria commented 6 years ago

NU1608: Detected package version outside of dependency constraint: Microsoft.ServiceFabric.FabricTransport.Internal 3.0.467 requires Microsoft.ServiceFabric (= 6.1.467) but version Microsoft.ServiceFabric 6.3.176 was resolved. NU1107: Version conflict detected for Microsoft.ServiceFabric.Services. Reference the package directly from the project to resolve this issue. employee -> Microsoft.ServiceFabric.AspNetCore.Kestrel 3.2.176 -> Microsoft.ServiceFabric.AspNetCore.Abstractions 3.2.176 -> Microsoft.ServiceFabric.Services (= 3.2.176) employee -> Microsoft.ApplicationInsights.ServiceFabric.Native 2.1.1 -> Microsoft.ServiceFabric.Services.Remoting 3.0.467 -> Microsoft.ServiceFabric.Services (= 3.0.467). Package restore failed. Rolling back package

Also tried the suggestion to install remoting 3.2.162, but that too fails.

Severity Code Description Project File Line Suppression State Error Version conflict detected for Microsoft.ServiceFabric.Services. Reference the package directly from the project to resolve this issue. employee -> Microsoft.ServiceFabric.AspNetCore.Kestrel 3.2.176 -> Microsoft.ServiceFabric.AspNetCore.Abstractions 3.2.176 -> Microsoft.ServiceFabric.Services (= 3.2.176) -> Microsoft.ServiceFabric.Services.Remoting 3.2.162 -> Microsoft.ServiceFabric.Services (= 3.2.162). 0
Please advise as I am stuck.

yantang-msft commented 6 years ago

@hemantkathuria Basically you want to make sure all SF packages in your project is the same version. So in your case, you want to reference version 3.2.176 explicitly. Looks like this is causing trouble for a lot of people. I'll see if this can be solved by changing our nuget package dependency definition sometime next week maybe.

yantang-msft commented 6 years ago

@hemantkathuria According to the nuget dependency resolution rule, this is indeed a situation that nuget let the end user specify the version. I believe nuget can add more rules/logics to resolve the dependency on behalf of the user. I guess for some reason (performance for example), they just choose not to do so.

ttamaranazc commented 5 years ago

first. Thanks.

This order worked for me. Microsoft.ServiceFabric.Services 3.2.176

Microsoft.ServiceFabric.Services.Remoting 3.2.176

Microsoft.ServiceFabric.Diagnostics.Internal 3.2.176

huajunzhao commented 5 years ago

I encountered the similar the issue. After installing the Microsoft.ServiceFabric.Services.Remoting with a higher version first, then i was able to install Microsoft.ApplicationInsights.ServiceFabric.Native