microsoft / Power-CAT-Copilot-Studio-Kit

MIT License
52 stars 8 forks source link

Error using Application Insights - Could not load file or assembly #60

Open kenowak opened 1 week ago

kenowak commented 1 week ago

This is my fist time using Copilot Kit and I'm not sure I have the Application Insight setup correctly, I get this error when running the tests. Is there something additional needed in my Environment to load the assembly?

Action 'Generate_Azure_App_Insights_Access_Token' failed: An error occurred in cat_GenerateAppInsightsAccessToken: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Identity.Client, Version=4.16.1.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Microsoft.Identity.Client, Version=4.16.1.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' at POWERCAT.Plugins.ApplicationInsightsApi.InvokeApplicationInsightsApi.GenerateAppInsightsAccessTokenAsync(String tenantId, String clientId, String clientSecret) at POWERCAT.Plugins.ApplicationInsightsApi.InvokeApplicationInsightsApi.InvokeAppInsightsApiUsingMessage(IPluginExecutionContext context, ITracingService tracingService) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

patilravikiran commented 1 week ago

Acknowledged.

patilravikiran commented 1 week ago

Hi @kenowak, I assume you are using unmanaged version of CopilotStudioAccelerator by just updating few properties. Can you please download latest managed solution from Latest releases and try again?

kenowak commented 1 week ago

Hi @patilravikiran, I'm using the latest managed version.

patilravikiran commented 1 week ago

Hi @kenowak, please share the solution so we can import and see if it can be replicated at our end.

patilravikiran commented 6 days ago

@kenowak , Gentle reminder to share the solution.

kenowak commented 5 days ago

@patilravikiran here you go

CopilotStudioAccelerator_20240918.1_managed.zip

patilravikiran commented 4 days ago

@kenowak , Thanks, it helped me to reproduce and resolve this issue. The fix will be available in next release. Proposed date for next release - 1st week of November.

kenowak commented 4 days ago

Thanks @patilravikiran !