Uninstall the Insight application from the application in Visual Studio 2013

In Visual Studio, I added an application view to a project that creates ApplicationInsights.config, and I'm not sure which other files were added to the project.

The fact that right-clicking and clicking Add Application Insight was pretty simple. Now I am unsuccessfully looking at how to remove the application view for this project.

How can i achieve this?

On a production server, using DebugView, I see telemetry logs, even after closing Application Monitor services on the server.

Any help is appreciated, I want to completely get rid of the understanding of the application in this application.

+67
visual-studio-2013 azure-application-insights
Apr 22 '14 at 19:42
source share
6 answers

If I do not understand the question, you only need to remove one extension and possibly one nuget package.

Uninstall the Application Insights Tools extension for Visual Studio and uninstall the Application Telemetry SDK for Services nuget. The telemetry package is installed with Application Insights, but must be uninstalled separately.

In my experience, a telemetry package is not required if you want to use other Application Insights features. Removing a telemetry package will stop all telemetry protocols, but Application Insights will continue to report non-telemetry information as accurately as possible.

+50
Apr 23 '14 at 20:41
source share

I just wanted to add to the answers already received, I just went through this process using the ASP.NET MVC 5 project.

Removing with NuGet

As the other answers say, the best way to remove Application Insights is through Nuget: Tools -> NuGet Package Manager -> Manage NuGet Packages for the solution.

I was better off uninstalling Microsoft.ApplicationInsights.Web and all its dependencies, and then the Microsoft.ApplicationInsights.Javascrtipt API .

This removed everything except:

  • file ApplicationInsights.config,
  • a script fragment in _Layout.cshtml,

both of which I deleted manually.

What Microsoft has to say

The Microsoft Azure documentation here: https://azure.microsoft.com/en-gb/documentation/articles/app-insights-troubleshoot-faq/ , says:

What will change Application Insights in my project?

Details depend on the type of project. For web application:

Adds these files to your project:

  • ApplicationInsights.config.
  • ai.js

Installs these NuGet packages:

  • API Application Insights - the core API
  • Application API for web applications - used to send telemetry from the server
  • Application API for JavaScript applications - used to send telemetry from a client

Packages include these assemblies:

  • Microsoft.ApplicationInsights
  • Microsoft.ApplicationInsights.Platform

Inserts elements into:

  • Web.config
  • packages.config (only for new projects - if you add Application Insights to an existing project, you need to do it manually.) Insert code fragments of the client and server to initialize them using the Insights application resource identifier. For example, in an MVC application, code is inserted in the main page Views / Shared / _Layout.cshtml

Delete manually

To remove Insight Insight without NuGet, or, like me, you do not trust him and want to know which files are deleted, I performed the following steps:

  • Remove application information from web.config, under system.webserver.modules, find ApplicationInsightsWebTracking.

  • Remove all references to Microsoft.AI (Application Insights) from references to projects.

  • Remove all Microsoft.ApplicationInsights packages from package.config.

  • Delete the ApplicationInsights.config file.

  • Remove the script from _Layout.cshtml:

    var appInsights=window.appInsights||function(config){ function r(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s=u.createElement(o),i,f;for(s.src=config.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",u.getElementsByTagName(o)[0].parentNode.appendChild(s),t.cookie=u.cookie,t.queue=[],i=["Event","Exception","Metric","PageView","Trace"];i.length;)r("track"+i.pop());return r("setAuthenticatedUserContext"),r("clearAuthenticatedUserContext"),config.disableExceptionTracking||(i="onerror",r("_"+i),f=e[i],e[i]=function(config,r,u,e,o){var s=f&&f(config,r,u,e,o);return s!==!0&&t["_"+i](config,r,u,e,o),s}),t }({ instrumentationKey:"RemovedKey" }); window.appInsights=appInsights; appInsights.trackPageView(); 
  • Remove ai.0.15.0-build58334.js and ai.0.15.0-build58334.min.js from the Scripts directory.

  • Clean and rebuild everything.

+69
May 17 '16 at 10:08
source share

I would prefer to do this:

 UnInstall-Package Microsoft.ApplicationInsights.Web -RemoveDependencies 
+19
Mar 29 '17 at 2:31 on
source share

If you use the NuGet Package Manager for the solution (Tools β†’ NuGet Package Manager β†’ Manage NuGet Packages for Solution), you can search for ApplicationInsights and remove the package, and you can remove the dependencies. There may be several. This is the easiest way to clear ALL dependencies, not just some.

+13
Jul 12 '15 at 10:19
source share

With the new ASP.Net Core 1.1 project:

  • Uninstall Microsoft.ApplicationInsights.AspNetCore nuget
  • Remove inject Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet JavaScriptSnippet from _Layout.cshtml
  • Remove @Html.Raw(JavaScriptSnippet.FullScript) from _Layout.cshtml
  • Remove .UseApplicationInsights() from program.cs
+3
Mar 28 '17 at 13:57
source share

I solved this by first removing all Application Insight packages from (Tools -> NuGet Package Manager -> Managing NuGet Packages for the solution)

Then run

Uninstall Microsoft.AspNet.TelemetryCorrelation -Version 1.0.0 -RemoveDependencies

in the Nuget console.

This fixed it for me.

0
Nov 06 '17 at 9:21
source share



All Articles