microsoft / ApplicationInsights-ServiceFabric

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

Microsoft.ApplicationInsights.ServiceFabric.FabricTelemetryInitializer exists in multiple assemblies #73

Closed Lillvik closed 6 years ago

Lillvik commented 6 years ago

Microsoft.ApplicationInsights.ServiceFabric.FabricTelemetryInitializer is available in the following assemblies. Microsoft.AI.ServiceFabric.Native Microsoft.AI.ServiceFabric

Since Microsoft.ApplicationInsights.ServiceFabric.Native has dependency to Microsoft.ApplicationInsights.ServiceFabric both the assemblies above are included when Microsoft.ApplicationInsights.ServiceFabric.Native is added to a project.

This results in the following error

The type 'FabricTelemetryInitializer' exists in both 'Microsoft.AI.ServiceFabric.Native, Version=2.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'Microsoft.AI.ServiceFabric, Version=2.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

yantang-msft commented 6 years ago

@Lillvik Can you try using FabricTelemetryInitializerExtension.CreateFabricTelemetryInitializer(this.Context) instead of creating the TelemetryIntializer directly?

yantang-msft commented 6 years ago

Fixed in https://github.com/Microsoft/ApplicationInsights-ServiceFabric/pull/75