Merge pull request #4494 from aspnet/scottaddie/app-insights-netfx
Add 2.0 App Insights migration instructions for .NET Frameworkpull/4519/head
commit
3cf879f6be
|
@ -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:
|
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)]
|
[!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)]
|
[!code-csharp[Main](../1x-to-2x/samples/AspNetCoreDotNetCore1App/AspNetCoreDotNetCore1App/Program.cs?name=snippet_ProgramCsMain&highlight=8)]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue