Skip to content

Commit 99b66b0

Browse files
authored
Merge pull request #7897 from MicrosoftDocs/master
merge to live
2 parents 9da787b + 46481a2 commit 99b66b0

9 files changed

+121
-7
lines changed

docs/containers/container-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use Visual Studio Container Tools and Docker for Windo
55
ms.author: ghogen
66
ms.date: 01/24/2020
77
ms.technology: vs-azure
8-
ms.topic: include
8+
ms.topic: quickstart
99
---
1010
# Quickstart: Docker in Visual Studio
1111

docs/containers/tutorial-multicontainer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.custom: SEO-VS-2020
66
ms.author: ghogen
77
ms.date: 01/10/2020
88
ms.technology: vs-azure
9-
ms.topic: include
9+
ms.topic: tutorial
1010
---
1111
# Tutorial: Create a multi-container app with Docker Compose
1212

docs/get-started/csharp/tutorial-aspnet-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ Here's a quick FAQ to highlight some key concepts.
351351

352352
### What is C#?
353353

354-
[C#](/dotnet/csharp/getting-started/introduction-to-the-csharp-language-and-the-net-framework) is a type-safe and object-oriented programming language that's designed to be both robust and easy to learn.
354+
[C#](https://docs.microsoft.com/dotnet/csharp/tour-of-csharp/) is a type-safe and object-oriented programming language that's designed to be both robust and easy to learn.
355355
356356
### What is ASP.NET Core?
357357

docs/ide/git-with-visual-studio.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ From both locations, you can switch between existing branches.
111111

112112
### Create a new branch
113113

114-
You can also create a new branch. The equivalent command for this action is `git checkout <branchname>`.
114+
You can also create a new branch. The equivalent command for this action is `git checkout -b <branchname>`.
115115

116116
Creating a new branch is as simple as entering the branch name and basing it off an existing branch.
117117

docs/ide/using-regular-expressions-in-visual-studio.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The following table contains some regular expression characters, operators, cons
5454
|Match any [whitespace character](/dotnet/standard/base-types/character-classes-in-regular-expressions#whitespace-character-s)|\s|`Public\sInterface` matches the phrase "Public Interface"|
5555
|Match any [decimal digit character](/dotnet/standard/base-types/character-classes-in-regular-expressions#decimal-digit-character-d)|\d|`\d` matches "4" and "0" in "wd40"|
5656

57-
An example regular expression that combines some of the operators and constructs to match a hexadecimal number is `\b0[xX]([0-9a-fA-F]+\)\b`. This expression matches "0xc67f" but not "0xc67g".
57+
An example regular expression that combines some of the operators and constructs to match a hexadecimal number is `\b0[xX]([0-9a-fA-F]+)\b`. This expression matches "0xc67f" but not "0xc67g".
5858

5959
> [!TIP]
6060
> In Windows operating systems, most lines end in "\r\n" (a carriage return followed by a new line). These characters aren't visible but are present in the editor and passed to the .NET regular expression service.

docs/install/install-and-use-visual-studio-behind-a-firewall-or-proxy-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ To make sure that you have access to everything you want when you use Visual Stu
135135
| Debugger | 1. <br>vsdebugger.blob.core.windows.net <br>vsdebugger.azureedge.net <br><br>2. <br>download.visualstudio.com/\*/<br/>onecore.msvsmon.\*.zip<br><br> 3. referencesource.microsoft.com/symbols <br><br> 4. <br>symbols.nuget.org/download/symbols<br><br> 5. visualstudio.com<br><br>6. msdl.microsoft.com/download/symbols | https/443 | 1. <br>Used for downloading debugger bits for .NET Core debugging on Unix / macOS over SSH <br><br>2. <br>Used for downloading debugger bits for remote Windows Docker container debugging<br><br> 3. Used for .NET framework source stepping <br><br> 4. <br>(If user opts-in) Used for downloading symbols published to nuget.org symbol server.<br><br> 5. (If user opts-in) Used for downloading MS symbols and binaries, might also be needed for debugging managed code in dumps |
136136
| GitHub Codespaces| \*.online.visualstudio.com | https/443 | Used to call GitHub Codespaces APIs |
137137
| Xamarin Android App Publishing | \*.googleapis.com <br/> play.google.com <br/>accounts.google.com | https/443 | Used to interact with Google Play Store service to publish/upload Xamarin Android Applications directly from Visual Studio. |
138+
| Visual Studio Search Service | data-ai.microsoft.com/search | https/443 | Used to provide AI-enabled Visual Studio Search Service in `Ctrl+Q` search box |
138139
| Azure Container Registry | *.azurecr.io | https/443 | Access container registries hosted on Azure, for configuration of CICD pipelines |
139140
| | | | |
140141

docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ These settings are specific to the test adapter that runs test methods that have
300300
<DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete>
301301
<DeploymentEnabled>False</DeploymentEnabled>
302302
<AssemblyResolution>
303-
<Directory Path="D:\myfolder\bin\" includeSubDirectories="false"/>
303+
<Directory path="D:\myfolder\bin\" includeSubDirectories="false"/>
304304
</AssemblyResolution>
305305
</MSTest>
306306
```
@@ -316,7 +316,7 @@ These settings are specific to the test adapter that runs test methods that have
316316
|**DeleteDeploymentDirectoryAfterTestRunIsComplete**|true|To retain the deployment directory after a test run, set this value to **false**.|
317317
|**MapInconclusiveToFailed**|false|If a test completes with an inconclusive status, it is mapped to the skipped status in **Test Explorer**. If you want inconclusive tests to be shown as failed, set the value to **true**.|
318318
|**InProcMode**|false|If you want your tests to be run in the same process as the MSTest adapter, set this value to **true**. This setting provides a minor performance gain. But if a test exits with an exception, the remaining tests don't run.|
319-
|**AssemblyResolution**|false|You can specify paths to additional assemblies when finding and running unit tests. For example, use these paths for dependency assemblies that aren't in the same directory as the test assembly. To specify a path, use a **Directory Path** element. Paths can include environment variables.<br /><br />`<AssemblyResolution> <Directory Path="D:\myfolder\bin\" includeSubDirectories="false"/> </AssemblyResolution>`|
319+
|**AssemblyResolution**|false|You can specify paths to additional assemblies when finding and running unit tests. For example, use these paths for dependency assemblies that aren't in the same directory as the test assembly. To specify a path, use a **Directory Path** element. Paths can include environment variables.<br /><br />`<AssemblyResolution> <Directory path="D:\myfolder\bin\" includeSubDirectories="false"/> </AssemblyResolution>`|
320320

321321
## Example *.runsettings* file
322322

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: Update to MSTestV2
3+
description: Learn how to update from MSTestV1 to MSTestV2
4+
ms.custom: SEO-VS-2020
5+
ms.date: 02/26/2021
6+
ms.topic: conceptual
7+
f1_keywords:
8+
- vs.UnitTest.Migrate
9+
author: mikejo5000
10+
ms.author: mikejo
11+
manager: jmartens
12+
ms.workload:
13+
- multiple
14+
---
15+
16+
# Upgrade from MSTestV1 to MSTestV2
17+
18+
You can upgrade your test project by retargeting the MSTest version referenced in your *.csproj* from the MSTestV1 to MSTestV2. Not all features in MSTestV1 were brought forward into MSTestV2, so some changes may be required to resolve errors. See [MSTestV1 features that are not supported in MSTestV2](#mstestv1-features-that-are-not-supported-in-mstestv2) to understand what features will no longer function. Some of these may need to be removed from your tests.
19+
20+
1. Remove the assembly reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework from your unit test project.
21+
2. Add NuGet package references to MSTestV2 including the [MSTest.TestFramework](https://www.nuget.org/packages/MSTest.TestFramework) and the [MSTest.TestAdapter](https://www.nuget.org/packages/MSTest.TestAdapter/) packages on nuget.org. You can install packages in the NuGet Package Manager Console with the following commands:
22+
23+
```console
24+
PM> Install-Package MSTest.TestAdapter -Version 2.1.2
25+
PM> Install-Package MSTest.TestFramework -Version 2.1.2
26+
```
27+
28+
### Old style csproj example
29+
30+
Sample *.csproj* targeting MSTestV1:
31+
32+
```xml
33+
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
34+
<Private>False</Private>
35+
</Reference>
36+
```
37+
38+
Sample *.csproj* now targeting MSTestV2:
39+
40+
```xml
41+
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
42+
<HintPath>..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
43+
</Reference>
44+
```
45+
46+
> [!NOTE]
47+
> Test projects that are Coded UI tests or Web Load Tests are not compatible with MSTestV2. These project types have been deprecated. Read more on [Coded UI Test deprecation](https://devblogs.microsoft.com/devops/changes-to-coded-ui-test-in-visual-studio-2019/) and [Web Load Test deprecation](https://devblogs.microsoft.com/devops/cloud-based-load-testing-service-eol/).
48+
49+
### SDK-style csproj (.NET Core and .NET 5)
50+
51+
If your *.csproj* is the newer SDK-style *.csproj* you're most likely already using MSTestV2. You can find the NuGet packages for [MSTestV2](https://www.nuget.org/packages/MSTest.TestFramework) and the [MSTestV2 Adapter](https://www.nuget.org/packages/MSTest.TestAdapter/) on NuGet.
52+
53+
Example:
54+
55+
```xml
56+
<ItemGroup>
57+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
58+
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
59+
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
60+
</ItemGroup>
61+
```
62+
63+
## Why Upgrade to MSTestV2?
64+
65+
In 2016, we released the next step in evolving the MSTest framework with MSTestV2. You can read more about this change in the announcement [blog post](https://devblogs.microsoft.com/devops/taking-the-mstest-framework-forward-with-mstest-v2/).
66+
67+
* MSTestV2 is more easily acquired and updated because it's delivered as a [NuGet Package](https://www.nuget.org/packages/MSTest.TestFramework/).
68+
* MSTestV2 is [open source](https://github.com/microsoft/testfx).
69+
* Uniform app-platform support – MSTestV2 is a converged implementation that offers uniform app-platform support across .NET Framework, .NET Core, ASP.NET Core, and UWP. [Read more](https://blogs.msdn.microsoft.com/devops/2016/09/01/announcing-mstest-v2-framework-support-for-net-core-1-0-rtm/).
70+
* The implementation is fully cross platform (Windows, Linux, Mac). [Read more](https://blogs.msdn.microsoft.com/devops/2017/04/05/mstest-v2-is-open-source/).
71+
* MSTestV2 supports targeting .NET Framework 4.5.0 and later, .NET Core 1.0 and later (Universal Windows Apps 10+), ASP.NET Core 1.0 and later, and .NET 5 and later.
72+
* Provides a uniform, single end-user extensibility mechanism. [Read more](https://blogs.msdn.microsoft.com/devops/2017/07/18/extending-mstest-v2/).
73+
* Provides a uniform `DataRow` support for all MSTest based test projects. [Read more](https://blogs.msdn.microsoft.com/devops/2017/02/25/mstest-v2-now-and-ahead/).
74+
* Enables placing the `TestCategory` attribute at the level of a class or assembly. [Read more](https://blogs.msdn.microsoft.com/devops/2017/02/25/mstest-v2-now-and-ahead/).
75+
* Test methods from base classes defined in another assembly are now discovered and run from the derived Test class. This change brings in a consistent behavior with derived test class types. If this behavior isn't required for compatibility reasons, it can be changed back using the following run settings:
76+
77+
```xml
78+
<RunSettings>
79+
<MSTest>
80+
<EnableBaseClassTestMethodsFromOtherAssemblies>false</EnableBaseClassTestMethodsFromOtherAssemblies>
81+
</MSTest>
82+
</RunSettings>
83+
```
84+
85+
* Provides finer-grained control over parallel execution via [in-assembly parallel execution](https://github.com/Microsoft/testfx-docs/blob/master/RFCs/004-In-Assembly-Parallel-Execution.md) of tests. This enables running tests within an assembly in parallel.
86+
* The `TestCleanup` method on a `TestClass` is invoked even if its corresponding `TestInitialize` method fails. [Issue details](https://github.com/Microsoft/testfx/issues/250).
87+
* The time taken by `AssemblyInitialize` and `ClassInitialize` isn't counted towards the test duration. This change limits their impact on a test timing out.
88+
* Tests that aren't runnable can be configured to be marked as failed via the `MapNotRunnableToFailed` tag, which is part of the adapter node in the `.runsettings` file.
89+
90+
```xml
91+
<RunSettings>
92+
<MSTest>
93+
<MapNotRunnableToFailed>true</MapNotRunnableToFailed>
94+
</MSTest>
95+
</RunSettings>
96+
```
97+
98+
## MSTestV1 features that are not supported in MSTestV2
99+
100+
* Tests cannot be included into an "Ordered Test".
101+
* The adapter doesn't support being configured via a *.testsettings* file. Use the new [*.runsettings* file](../test/configure-unit-tests-by-using-a-dot-runsettings-file.md) for test run configuration.
102+
* The adapter doesn't support test lists specified as a *.vsmdi* file.
103+
* The "Coded UI Test Project" and the "Web Performance and Load Test Project" types are not supported. Read more on [Coded UI Test deprecation](https://devblogs.microsoft.com/devops/changes-to-coded-ui-test-in-visual-studio-2019/) and [Web Load Test deprecation](https://devblogs.microsoft.com/devops/cloud-based-load-testing-service-eol/).
104+
105+
## See also
106+
107+
- [Configure test runs with `.runsettings`](../test/configure-unit-tests-by-using-a-dot-runsettings-file.md)
108+
- [Unit test your code](../test/unit-test-your-code.md)
109+
- [Debug unit tests with Test Explorer](../test/debug-unit-tests-with-test-explorer.md)

docs/test/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@
119119
href: customizing-code-coverage-analysis.md
120120
- name: Troubleshoot code coverage
121121
href: troubleshooting-code-coverage.md
122+
- name: Migration
123+
items:
124+
- name: Upgrade from MSTestV1 to MSTestV2
125+
href: mstest-update-to-mstestv2.md
122126
- name: Live Unit Testing
123127
items:
124128
- name: Introduction

0 commit comments

Comments
 (0)