I have an Console Application with Target Framework .NET Framework v4.6.1 that I published it to Azure Functions. That application works without any error. There is no problem with that.
One of it's Nuget packages needed to be updated. But that updated version needs at least .NET Framework v4.6.2. So I have updated my Console Application's Target Framework level to 4.6.2 and I debugged it in my local. No problem with that.
But now I can't run the application on Azure. It won't build and run the function. What do I need to do on Azure end?
2022-09-08T13:07:22.403 [Error] D:\home\site\wwwroot\bin\CreatePlanningAndUserOverviewYearly.exe : System.Management.Automation.RemoteExceptionat run.ps1: line 1+ D:\home\site\wwwroot\bin\CreatePlanningAndUserOverviewYearly.exe+ ________________________________________________________________+ CategoryInfo : NotSpecified: (:String) [], RemoteException+ FullyQualifiedErrorId : NativeCommandError 2022-09-08T13:07:22.416 [Error] D:\home\site\wwwroot\bin\CreatePlanningAndUserOverviewYearly.exe : Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Xrm.Tooling.Connector, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)at UES.CRM.Backend.CreatePlanningAndUserOverviewYearly.Main(String[] args)at run.ps1: line 1+ D:\home\site\wwwroot\bin\CreatePlanningAndUserOverviewYearly.exe+ ________________________________________________________________+ CategoryInfo : NotSpecified: (:) [], RemoteException+ FullyQualifiedErrorId : NativeCommandErrorMessage 2022-09-08T13:07:22.463 [Error] Exception while executing function: Functions.CreatePlanningAndUserOverviewYearly. Microsoft.Azure.WebJobs.Script: PowerShell script error. . 2022-09-08T13:07:22.478 [Error] Function completed (Failure, Id=fb0c79e2-d4bc-4992-b1ec-292f8b77db62, Duration=1494ms)