Get rid of annoying Application Insights Telemetry output items in ASP.Net Core web projects
I was working on this web ASP.Net Core 2.0 project that was spewing a lot of "Application Insights Telemetry (unconfigured): ..." messages in the Debug Output window. At first I thought I should just remove the Microsoft Application Insights NuGet package, but it didn't work. By default, it will still use insights even if you don't have it referenced anywhere in your code.
The solution is to do have installed Microsoft Application Insights NuGet package, but then set
Apparently, in the preview versions of Visual Studio 2017 there is an option under Options → Projects and Solutions → Web Projects → Disable local Application Insights for Asp.net Core web projects, too.
Update: A comment suggested you need to Disable the automatic loading of hosting startup assemblies which can be done in two ways:
Either of these works, and although I agree with Andrei that the underlying issue for the unwanted telemetry is the automatic loading of hosting assemblies, I feel like the first option, the one that actually contains the word Telemetry in it is better for reasons of readability. But it's good there are three options to choose from.
The solution is to do have installed Microsoft Application Insights NuGet package, but then set
Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.Active.DisableTelemetry = true;somewhere in Startup.cs (the constructor is fine).
Apparently, in the preview versions of Visual Studio 2017 there is an option under Options → Projects and Solutions → Web Projects → Disable local Application Insights for Asp.net Core web projects, too.
Update: A comment suggested you need to Disable the automatic loading of hosting startup assemblies which can be done in two ways:
- setting ASPNETCORE_preventHostingStartup to True or 1 in the project properties → Debug → Environment variables
- Doing something like
WebHost.CreateDefaultBuilder(args)
- available from .NET Core 2.0
.UseSetting(WebHostDefaults.PreventHostingStartupKey, "true")
...
Either of these works, and although I agree with Andrei that the underlying issue for the unwanted telemetry is the automatic loading of hosting assemblies, I feel like the first option, the one that actually contains the word Telemetry in it is better for reasons of readability. But it's good there are three options to choose from.
Written as a 19th century explorer's memories, this book subtly achieves several things, effectively and decently. First of all, it is a sort of fantasy, although really if one removes the dragons, it's pretty much normal history. Second of all, it is a feminist story, but one done well. Instead of describing the horrible things done to women by evil cardboard characters, we get an intelligent and driven female hero that makes the most of her advantaged situation to expand her goals and enrich her life, despite social norms, but supported by friends and loving family. She is young, attractive, but not extraordinarily so, and her fascination towards dragons and science books leads her towards a career normally reserved for men. She is inspiring as a model, rather than complaining about her helplessness. She gets by through her efforts and skill, not by magically being gifted super powers. The fact that the action is set in a reasonably old period so that folk don't get touchy about it, but close enough so that it describes people that thought themselves the pinnacle of civilization helps with making the reading comfortably remote, but seriously instructive. Thirdly, it is written in an easy to read way, a personal memoir that can be understood by adults and children alike.
I really tried to read and enjoy this book, which is highly rated and reviewed, which makes me wonder whether there is something wrong with me. Whatever the reason, I couldn't even finish it. Everything in this book is grating my senses, from the writing style to the scenes details, from the editing to the basic story outline. If you've read Dexter (the book the TV show is based on, not the TV show itself) you will have found a similar plot, but as I thought that book was bad, this one felt worse. I can't imagine who in their right mind would give this a full rating.