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

library causes version conflict when using Microsoft.Services.ServiceFabric >= 3.3.664 #108

Closed
DOliana opened this issue Jan 27, 2020 · 4 comments

Comments

@DOliana
Copy link

DOliana commented Jan 27, 2020

When referencing a version of Microsoft.Services.ServiceFabric >= 3.3.664 in the SF-Service project, trying to add a reference to Microsoft.ApplicationInsights.ServiceFabric.Native causes a version conflict.

Sample error:

Fehler	NU1107	Versionskonflikt entdeckt für "Microsoft.ServiceFabric.Diagnostics.Internal". Installieren bzw. referenzieren Sie "Microsoft.ServiceFabric.Diagnostics.Internal 4.0.457" direkt in Projekt "SF-Service", um dieses Problem zu beheben. 
 SF-Service-> Microsoft.ServiceFabric.Services 4.0.457 -> Microsoft.ServiceFabric.Diagnostics.Internal (= 4.0.457) 
 SF-Service-> Common.ServiceFabricCommons -> Microsoft.ApplicationInsights.ServiceFabric.Native 2.3.1 -> Microsoft.ServiceFabric.Services.Remoting 3.3.664 -> Microsoft.ServiceFabric.Diagnostics.Internal (= 3.3.664).		

@brahmnes
Copy link
Contributor

Hi @DOliana,

Microsoft.ApplicationInsights.ServiceFabric.Native is pretty easy going with reference versions. If you look at the nuget page, all service fabric version dependencies are declared with a >= constraint.
https://www.nuget.org/packages/Microsoft.ApplicationInsights.ServiceFabric.Native/

It looks like you can resolve it by installing explicitly a version of Microsoft.ServiceFabric.Services.Remoting 4.0.457 first, which should be compatible with Microsoft.ServiceFabric.Services 4.0.457. Then installing Microsoft.ApplicationInsights.ServiceFabric.Native should work.

@DOliana
Copy link
Author

DOliana commented Jan 27, 2020

I know (or at least am pretty sure) I can solve it by referencing versions directly. The thing is, that then I will have to monitor that dependency on every future update.

It probably isn't even the fault of the app insights-library but more of the remoting-library for having a hard dependency.

My question is, whether there is an alternative way of doing this.

@brahmnes
Copy link
Contributor

I don't know of a better way. I think this is a general nuget problem.
As a general practice, it may be better to ensure all Microsoft.ServiceFabric.* nugets to stay in sync for version numbers, but I assume in your case, it's the application insights library that's bringing in the remoting dependency.

@yantang-msft
Copy link
Contributor

Closing this issue as it has been reported couple times #79, #82, and we suggest specifying the version explicitly.

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

3 participants