Closed DOliana closed 4 years ago
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.
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.
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.
Closing this issue as it has been reported couple times https://github.com/microsoft/ApplicationInsights-ServiceFabric/issues/79, https://github.com/microsoft/ApplicationInsights-ServiceFabric/issues/82, and we suggest specifying the version explicitly.
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: