diff --git a/aspnetcore/test/index.md b/aspnetcore/test/index.md index a52b1117e8..bb1fad044b 100644 --- a/aspnetcore/test/index.md +++ b/aspnetcore/test/index.md @@ -5,7 +5,7 @@ description: Links to resources for testing and debugging ASP.NET Core applicati manager: wpickett ms.author: riande ms.custom: mvc -ms.date: 05/24/2018 +ms.date: 06/13/2018 ms.prod: asp.net-core ms.technology: aspnet ms.topic: article @@ -13,13 +13,32 @@ uid: test/index --- # Test, debug, and troubleshoot in ASP.NET Core -* [Unit testing](/dotnet/articles/core/testing/unit-testing-with-dotnet-test) -* [Integration tests](xref:test/integration-tests) -* [Razor Pages unit tests](xref:test/razor-pages-tests) -* [Test controllers](xref:mvc/controllers/testing) -* [Debug ASP.NET Core 2.x source](https://github.com/aspnet/Docs/issues/4155) -* [Remote debugging](/visualstudio/debugger/remote-debugging-azure) -* [Snapshot debugging](/azure/application-insights/app-insights-snapshot-debugger) -* [NDC Conference (London, 2018): Diagnosing issues in ASP.NET Core Applications](https://www.youtube.com/watch?v=RYI0DHoIVaA) -* [ASP.NET Blog: Troubleshooting ASP.NET Core Performance Problems](https://blogs.msdn.microsoft.com/webdev/2018/05/23/asp-net-core-performance-improvements/) -* [Troubleshoot](xref:test/troubleshoot) +## Test + +[Unit Testing in .NET Core and .NET Standard](/dotnet/articles/core/testing/) +See how to use unit testing in .NET Core and .NET Standard projects. + +[Integration tests](xref:test/integration-tests) +Learn how integration tests ensure that an app's components function correctly at the infrastructure level, including the database, file system, and network. + +[Razor Pages unit tests](xref:test/razor-pages-tests) +Discover how to create unit tests for Razor Pages apps. + +[Test controllers](xref:mvc/controllers/testing) +Learn how to test controller logic in ASP.NET Core with Moq and xUnit. + +## Debug + +[Debug ASP.NET Core 2.x source](https://github.com/aspnet/Docs/issues/4155) +Learn how to debug .NET Core and ASP.NET Core sources. + +[Remote debugging](/visualstudio/debugger/remote-debugging-azure) +Discover how to set up and configure a Visual Studio 2017 ASP.NET Core app, deploy it to IIS using Azure, and attach the remote debugger from Visual Studio. + +[Snapshot debugging](/azure/application-insights/app-insights-snapshot-debugger) +Learn how to collect snapshots on your top-throwing exceptions so that you have the information you need to diagnose issues in production. + +## Troubleshoot + +[Troubleshoot](xref:test/troubleshoot) +Understand and troubleshoot warnings and errors with ASP.NET Core projects. diff --git a/aspnetcore/test/troubleshoot.md b/aspnetcore/test/troubleshoot.md index 568a0e0875..678b9b182e 100644 --- a/aspnetcore/test/troubleshoot.md +++ b/aspnetcore/test/troubleshoot.md @@ -1,5 +1,5 @@ --- -title: Troubleshoot for ASP.NET Core +title: Troubleshoot ASP.NET Core projects author: Rick-Anderson description: Understand and troubleshoot warnings and errors with ASP.NET Core projects. manager: wpickett @@ -19,56 +19,59 @@ The following links provide troubleshooting guidance: * [Troubleshoot ASP.NET Core on Azure App Service](xref:host-and-deploy/azure-apps/troubleshoot) * [Troubleshoot ASP.NET Core on IIS](xref:host-and-deploy/iis/troubleshoot) * [Common errors reference for Azure App Service and IIS with ASP.NET Core](xref:host-and-deploy/azure-iis-errors-reference) -* [YouTube: Diagnosing issues in ASP.NET Core Applications](https://www.youtube.com/watch?v=RYI0DHoIVaA) +* [NDC Conference (London, 2018): Diagnosing issues in ASP.NET Core Applications](https://www.youtube.com/watch?v=RYI0DHoIVaA) +* [ASP.NET Blog: Troubleshooting ASP.NET Core Performance Problems](https://blogs.msdn.microsoft.com/webdev/2018/05/23/asp-net-core-performance-improvements/) - ## .NET Core SDK warnings ### Both the 32 bit and 64 bit versions of the .NET Core SDK are installed -In the **New Project** dialog for ASP.NET Core, you may see the following warning: - Both 32 and 64 bit versions of the .NET Core SDK are installed. Only templates from the 64 bit version(s) installed at C:\Program Files\dotnet\sdk\" will be displayed. +In the **New Project** dialog for ASP.NET Core, you may see the following warning: + +> Both 32 and 64 bit versions of the .NET Core SDK are installed. Only templates from the 64 bit version(s) installed at 'C:\\Program Files\\dotnet\\sdk\\' will be displayed. ![A screenshot of the OneASP.NET dialog showing the warning message](troubleshoot/_static/both32and64bit.png) -This warning appears when both 32-bit (x86) and 64-bit (x64) versions of the [.NET Core SDK](https://www.microsoft.com/net/download/all) are installed. Common reasons both versions can be installed include: +This warning appears when both 32-bit (x86) and 64-bit (x64) versions of the [.NET Core SDK](https://www.microsoft.com/net/download/all) are installed. Common reasons both versions may be installed include: -* You originally downloaded the .NET Core SDK installer using a 32-bit machine, but then copied it across and installed it on a 64-bit machine. +* You originally downloaded the .NET Core SDK installer using a 32-bit machine but then copied it across and installed it on a 64-bit machine. * The 32-bit .NET Core SDK was installed by another application. * The wrong version was downloaded and installed. Uninstall the 32-bit .NET Core SDK to prevent this warning. Uninstall from **Control Panel** > **Programs and Features** > **Uninstall or change a program**. If you understand why the warning occurs and its implications, you can ignore the warning. ### The .NET Core SDK is installed in multiple locations -In the **New Project** dialog for ASP.NET Core you may see the following warning: - The .NET Core SDK is installed in multiple locations. Only templates from the SDK(s) installed at 'C:\Program Files\dotnet\sdk\' will be displayed. +In the **New Project** dialog for ASP.NET Core, you may see the following warning: + +> The .NET Core SDK is installed in multiple locations. Only templates from the SDK(s) installed at 'C:\\Program Files\\dotnet\\sdk\\' will be displayed. ![A screenshot of the OneASP.NET dialog showing the warning message](troubleshoot/_static/multiplelocations.png) -You see this message when you have at least one installation of the .NET Core SDK in a directory outside of *C:\Program Files\dotnet\sdk\*. Usually that happens when the .NET Core SDK has been deployed on a machine using copy/paste instead of the MSI installer. +You see this message when you have at least one installation of the .NET Core SDK in a directory outside of *C:\\Program Files\\dotnet\\sdk\\*. Usually this happens when the .NET Core SDK has been deployed on a machine using copy/paste instead of the MSI installer. Uninstall the 32-bit .NET Core SDK to prevent this warning. Uninstall from **Control Panel** > **Programs and Features** > **Uninstall or change a program**. If you understand why the warning occurs and its implications, you can ignore the warning. ### No .NET Core SDKs were detected -In the **New Project** dialog for ASP.NET Core you may see the following warning: -**No .NET Core SDKs were detected, ensure they are included in the environment variable 'PATH'** +In the **New Project** dialog for ASP.NET Core, you may see the following warning: + +> No .NET Core SDKs were detected, ensure they are included in the environment variable 'PATH'. ![A screenshot of the OneASP.NET dialog showing the warning message](troubleshoot/_static/NoNetCore.png) -This warning appears when the environment variable `PATH` doesn’t point to any .NET Core SDKs on the machine. To resolve this problem: +This warning appears when the environment variable `PATH` doesn't point to any .NET Core SDKs on the machine. To resolve this problem: * Install or verify the .NET Core SDK is installed. * Verify the `PATH` environment variable points to the location the SDK is installed. The installer normally sets the `PATH`. ::: moniker range=">= aspnetcore-2.1" -### Use of IHtmlHelper.Partial may result in application deadlocks +### Use of IHtmlHelper.Partial may result in app deadlocks In ASP.NET Core 2.1 and later, calling `Html.Partial` results in an analyzer warning due to the potential for deadlocks. The warning message is: -*Use of IHtmlHelper.Partial may result in application deadlocks. Consider using `` Tag Helper or `IHtmlHelper.PartialAsync`.* +> Use of IHtmlHelper.Partial may result in application deadlocks. Consider using `` Tag Helper or `IHtmlHelper.PartialAsync`. Calls to `@Html.Partial` should be replaced by `@await Html.PartialAsync` or the partial tag helper ``.