-
Notifications
You must be signed in to change notification settings - Fork 48
App Insights and .NET 4.6.1 in a Worker Role in emulator -- exception #69
Comments
More Info -- This problem may only be with the Worker role. I have a WCF service that is successfully outputting Telemetry.TrackRequest() info to the Visual Studio console window, although they are not showing up in Azure. |
That exception message sounds like you've got mixed versions of assemblies targeting different versions. We had this problem in one specific version (#23 (comment)), but that should be fixed. Can you tell me what version of Microsoft.ApplicationInsights.dll is getting imported into your project? (look at the assembly version itself, maybe using a tool like ILSpy if necessary) |
Hi Tomas, Thanks for your response. I looked at the assembly version of Thanks, On Mon, Aug 29, 2016 at 9:30 AM, Tomas Restrepo notifications@github.com
|
2.1.0 should be the right assembly version, but seems like something is requesting a different version for some reason. Any chance you could try running the service with a debugger attached and get the full exception and stack trace? (or event better, enable fusion logging to capture the entire assembly binding error message; the thread here has details on how to do it) |
Thanks for the suggestion. I have to deal with other things for a few Unfortunately the exception happens in the start method of WorkerRole.Run() I'll get back to you when I get things more pinned down. Thanks, On Mon, Aug 29, 2016 at 10:00 AM, Tomas Restrepo notifications@github.com
|
Tomas, System.IO.FileLoadException was unhandled Additional information: Could not load file or assembly 'Microsoft.ApplicationInsights, Version=2.1.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) I will continue with this later. |
Found the problem and fixed it. I have 3 projects that use the Application Insights assemblies. 2 of them When running the worker role Azure Runtime did not like the 2.2.0 assembly The way I figured this out was looking in the output window after doing http://stackoverflow.com/questions/24772053/found-conflicts-between-different-versions-of-the-same-dependent-assembly-that-c, Once I found the assemblies in conflict I used the solution wide NuGet Now it runs in the emulator with no problems. Tomorrow I'll try running it Application Insights is an amazing productivity enhancer. 10 years ago I Keep up the good work! On Mon, Aug 29, 2016 at 10:47 AM, George Stevens georgiageorge99@gmail.com
|
Found the problem and fixed it. I have 3 projects that use the Application Insights assemblies. 2 of them When running the worker role Azure Runtime did not like the 2.2.0 assembly The way I figured this out was looking in the output window after doing http://stackoverflow.com/questions/24772053/found- Once I found the assemblies in conflict I used the solution wide NuGet Now it runs in the emulator with no problems. Tomorrow I'll try running it Application Insights is an amazing productivity enhancer. 10 years ago I Keep up the good work! On Mon, Aug 29, 2016 at 10:47 AM, George Stevens georgiageorge99@gmail.com
|
Hi Tomas, George On Mon, Aug 29, 2016 at 9:33 PM, Tomas Restrepo notifications@github.com
|
Hi Tomas, FYI here is a blog article I wrote about my experience with Application George On Tue, Aug 30, 2016 at 5:52 PM, George Stevens georgiageorge99@gmail.com
|
@georgestevens99 Nice blog post, thanks for sharing! |
Hi,
First thanks for answering my question about NetMessagingBinding, etc.
I started with a worker role built targeting .NET 4.6.1 that successfully installs .NET 4.6.1 and can run OK in the emulator or in Azure.
Then I added app Insights Window Server assemblies via nuget to it, including manually upgrading App Insights Agent Intercept to 2.0.1 (in trying to get it to run). No luck. It crashes in the emulator with the following exception message:
System.IO.FileLoadException was unhandled
Message: An unhandled exception of type 'System.IO.FileLoadException' occurred in Microsoft.WindowsAzure.ServiceRuntime.dll
Additional information: Could not load file or assembly 'Microsoft.ApplicationInsights, Version=2.1.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)
Then I removed all the App Insight assemblies via NuGet and reinstalled them and got the same error message.
Can you point me in the right direction to using .NET 4.6.1, and eventually using a worker role to host a WCF service using the NetMessagingBinding and .NET 4.6.1, plus use App Insights (which is quite useful!). FYI I have successfully done all of that except when I add the App Insights assemblies the emulator crashes!
Thanks,
George
The text was updated successfully, but these errors were encountered: