Merge pull request #4494 from aspnet/scottaddie/app-insights-netfx

Add 2.0 App Insights migration instructions for .NET Framework
pull/4519/head
Scott Addie 2017-10-06 16:35:31 -05:00 committed by GitHub
commit 3cf879f6be
1 changed files with 2 additions and 2 deletions

View File

@ -158,11 +158,11 @@ Effortless setup of application performance instrumentation is important. You ca
ASP.NET Core 1.1 projects created in Visual Studio 2017 added Application Insights by default. If you're not using the Application Insights SDK directly, outside of *Program.cs* and *Startup.cs*, follow these steps:
1. Remove the following `<PackageReference />` node from the *.csproj* file:
1. If targeting .NET Core, remove the following `<PackageReference />` node from the *.csproj* file:
[!code-xml[Main](../1x-to-2x/samples/AspNetCoreDotNetCore1App/AspNetCoreDotNetCore1App/AspNetCoreDotNetCore1App.csproj?range=10)]
2. Remove the `UseApplicationInsights` extension method invocation from *Program.cs*:
2. If targeting .NET Core, remove the `UseApplicationInsights` extension method invocation from *Program.cs*:
[!code-csharp[Main](../1x-to-2x/samples/AspNetCoreDotNetCore1App/AspNetCoreDotNetCore1App/Program.cs?name=snippet_ProgramCsMain&highlight=8)]