You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/remove-application-insights.md
+73-66Lines changed: 73 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,75 @@ ms.date: 03/25/2020
10
10
11
11
This article will show you how to remove the ASP.NET and ASP.NET Core Application Insights SDK in Visual Studio.
12
12
13
-
To remove Application Insights, you'll need to remove the NuGet packages and references from the API in your application. You can remove NuGet packages by using the Package Management Console or Manage NuGet Solution in Visual Studio. The following sections will show you how to remove NuGet Packages and what was automatically added in your project. Be sure to confirm the files added and areas with in your own code in which you made calls to the API are removed.
13
+
To remove Application Insights, you'll need to remove the NuGet packages and references from the API in your application. You can remove NuGet packages by using the Package Management Console or Manage NuGet Solution in Visual Studio. The following sections will show two ways to remove NuGet Packages and what was automatically added in your project. Be sure to confirm the files added and areas with in your own code in which you made calls to the API are removed.
14
+
15
+
## Uninstall using the Package Management Console
16
+
17
+
# [.NET](#tab/net)
18
+
19
+
1. To open the Package Management Console, in the top menu select Tools > NuGet Package Manager > Package Manager Console.
20
+
21
+

22
+
1. Enter the following command: `Uninstall-Package Microsoft.ApplicationInsights.Web -RemoveDependencies`
23
+
24
+
After entering the command, the Application Insights package and all of its dependencies will be uninstalled from the project.
25
+
26
+

27
+
28
+
# [.NET Core](#tab/netcore)
29
+
30
+
1. To open the Package Management Console, in the top menu select Tools > NuGet Package Manager > Package Manager Console.
31
+
32
+

33
+
34
+
1. Enter the following command: ` Uninstall-Package Microsoft.ApplicationInsights.AspNetCore -RemoveDependencies`
35
+
After entering the command, the Application Insights package and all of its dependencies will be uninstalled from the project
36
+
37
+
---
38
+
39
+
## Uninstall using the Visual Studio NuGet UI
40
+
41
+
# [.NET](#tab/net)
42
+
43
+
1. In the *Solution Explore* on the right, right click on **Solution** and select **Manage NuGet Packages for Solution**
44
+
You'll then see a screen that allows you to edit all the NuGet packages that are part of the project.
45
+
46
+

47
+
48
+
1. Click on the "Microsoft.ApplicationInsights.Web" package. On the right, check the checkbox next to *Project* to select all projects.
49
+
50
+
1. To remove all dependencies when uninstalling, select the **Options** dropdown button below the section where you selected project.
51
+
52
+
Under *Uninstall Options*, select the checkbox next to *Remove dependencies*.
53
+
54
+
1. Select **Uninstall**
55
+
56
+

57
+
58
+
A dialog box will display that shows all of the dependencies to be removed from the application. Select **ok** to remove them.
59
+
60
+

61
+
62
+
1. After everything is uninstalled, you may still see "ApplicationInsights.config" and "AiHandleErrorAttribute.cs" in the *Solution Explore*. You can delete the two files manually.
63
+
64
+
# [.NET Core](#tab/netcore)
65
+
66
+
1. In the *Solution Explore* on the right, right click on **Solution** and select **Manage NuGet Packages for Solution**
67
+
68
+
You'll then see a screen that allows you to edit all the NuGet packages that are part of the project.
69
+
70
+

71
+
72
+
1. Click on "Microsoft.ApplicationInsights.AspNetCore" package. On the right, check the checkbox next to *Project* to select all projects then select **Uninstall**.
73
+
74
+

75
+
76
+
---
14
77
15
78
## What is created when you add Application Insights
16
79
80
+
When you add Application Insights to your project it creates files and adds code to some of your files. Only removing the NuGet Packages won't always remove these files and code. To fully remove Application Insights you should check and manually remove the added code or files from you projects along with any API calls you added in your project.
81
+
17
82
# [.NET](#tab/net)
18
83
19
84
When you add Application Insights Telemetry to a Visual Studio ASP.NET template project, it adds the following files:
@@ -23,7 +88,7 @@ When you add Application Insights Telemetry to a Visual Studio ASP.NET template
0 commit comments