I get the following error after publishing to Azure App Service.
Could not load file or assembly 'Microsoft.ApplicationInsights, Version = 1.2.0.5639, Culture = neutral, PublicKeyToken = 31bf3856ad364e35' or one of its dependencies. The system cannot find the file.
In the WebAPI project, I clearly see the Microsoft.ApplicationInsights link, and the version number is "1.2.0.5639".
I use VSO as my build server (vNext is not XAML based). I noticed in VSO build logs that I am getting a warning that the DLL is also missing.
C: \ Program Files (X86) \ MSBuild \ 14.0 \ Bin \ Microsoft.Common.CurrentVersion.targets (1819.5): warning MSB3245: Failed to resolve this link. The assembly "Microsoft.ApplicationInsights, Version = 1.2.0.5639, Culture = Neutral, PublicKeyToken = 31bf3856ad364e35, processorArchitecture = MSIL" could not be found. Verify that the assembly exists on disk. If this link is required by your code, you may get compilation errors.
The build server also shows this clearly:
The main link is "Microsoft.ApplicationInsights, Version = 1.2.0.5639, Culture = Neutral, PublicKeyToken = 31bf3856ad364e35, processorArchitecture = MSIL".
With the following warning:
[warning] C: \ Program Files (x86) \ MSBuild \ 14.0 \ bin \ Microsoft.Common.CurrentVersion.targets (1819.5):
MSB3245: . "Microsoft.ApplicationInsights, Version = 1.2.0.5639, = , PublicKeyToken = 31bf3856ad364e35, processorArchitecture = MSIL". , . , .
, , - MSIL?
: 3 - ( Application Insights). webjobs "webjobs-list.json", , . , 2/3 - DLL
2: WebJobs JSON .
3: , . , Visual Studio IDE, VSO.: * ( Visual Studio, WebAPI, Application Insights " ". , App Insights . , , web.config. Build/deploy WebAPI . WebJobs JSON.