Skip to content

Commit 86e426c

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/visualstudio-docs-pr (branch live)
2 parents 7a0f6d3 + 86f8776 commit 86e426c

8 files changed

+80
-61
lines changed

docs/ide/default-keyboard-shortcuts-in-visual-studio.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Default keyboard shortcuts
33
description: Learn about the default keyboard shortcuts in Visual Studio that allow you to access a variety of commands and windows.
44
ms.custom: SEO-VS-2020
5-
ms.date: 06/21/2021
5+
ms.date: 08/11/2021
66
ms.topic: reference
77
helpviewer_keywords:
88
- shortcut keys [Visual Studio], keyboard binding schemes
@@ -24,10 +24,16 @@ You can access a variety of [commands](reference/visual-studio-commands.md) and
2424
For a list of common keyboard shortcuts and other productivity information, see:
2525

2626
- [Keyboard tips](../ide/productivity-shortcuts.md)
27-
- [Productivity tips](../ide/productivity-features.md).
27+
- [Productivity tips](../ide/productivity-features.md)
2828

2929
For more information about accessibility in Visual Studio, see [Accessibility tips and tricks](../ide/reference/accessibility-tips-and-tricks.md) and [How to: Use the keyboard exclusively](../ide/reference/how-to-use-the-keyboard-exclusively.md).
3030

31+
## Printable shortcut cheatsheet
32+
33+
Click to get our [printable keyboard shortcut cheatsheet for Visual Studio](https://visualstudio.microsoft.com/keyboard-shortcuts.pdf).
34+
35+
[:::image type="content" source="media/default-keyboard-shortcuts-in-visual-studio/visual-studio-keyboard-shortcut-cheatsheet.png" alt-text="Printable cheatsheet for keyboard shortcuts.":::](https://visualstudio.microsoft.com/keyboard-shortcuts.pdf)
36+
3137
<a name="popular"></a>
3238
## Popular keyboard shortcuts for Visual Studio
3339

@@ -1474,6 +1480,3 @@ The shortcuts specific to this context are:
14741480
|Show graph view|**Ctrl+3**| XsdDesigner.ShowGraphView |
14751481
|Show start view|**Ctrl+1**| XsdDesigner.ShowStartView |
14761482

1477-
## See also
1478-
1479-
- [Visual Studio commands](reference/visual-studio-commands.md)

docs/ide/suggest-a-feature.md

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@ You can also start a feature suggestion directly from Visual Studio by choosing
2222

2323
Choosing **Provide a Suggestion** takes you to [Developer Community](https://aka.ms/feedback/suggest?space=8), where you can enter your suggestion.
2424

25-
## User Voice
26-
27-
Until now, Visual Studio users proposed new feature ideas on User Voice. By adding the *Suggest a feature* functionality to Developer Community, all of your feedback for the Visual Studio product team is now in one place.
28-
29-
The User Voice site has been made read-only. You can look back as you need to for context, but all new feature suggestions should be submitted on Developer Community.
30-
31-
We migrated an initial set of ideas from the User Voice forum to Developer Community. Migration was done based on the community impact of the feedback and our product roadmap priorities. If you were expecting to see a suggestion here that we may have missed, feel free to add it to Developer Community.
32-
33-
## Votes
34-
35-
The voting system in Developer Community is different to User Voice. To maintain the integrity of Developer Community vote counts and to avoid skewing of votes, we show the User Voice vote counts prominently as a tag next to each feature suggestion. As you continue to vote on suggestions in the enhanced Developer Community, your new vote counts will show separately from the User Voice vote counts.
36-
3725
## Suggestion status
3826

3927
After you submit a feature suggestion, states indicate where your feature submission is in its lifecycle. As we take your feedback into consideration and move it along the workflow, we tag it with the corresponding state. The various states associated with feature suggestions are listed here, along with a description of their meaning and color indicators.
@@ -103,32 +91,6 @@ Found the information we were looking for? You may request to reactivate the tic
10391

10492
- - -
10593

106-
## FAQ
107-
108-
### Why can't I see my User Voice idea in Developer Community?
109-
110-
New feature suggestions from the old User Voice forum have been migrated to Developer Community based on the impact to the broader community and our product road map priorities. If you think we've missed migrating your suggestion, add it as a new suggestion to Developer Community.
111-
112-
### Why have the votes not been carried over from User Voice?
113-
114-
The voting system in User Voice operates differently from the voting system in Developer Community. In the new system, we want to maintain the integrity of the vote counts and avoid skewing the data. We decided to show the User Voice vote counts prominently as a tag (instead of votes) for each suggestion. When users vote on suggest a feature submissions using Developer Community, the new votes will show separately from the User Voice votes.
115-
116-
### Where can I see comments associated with the suggestions imported from User Voice?
117-
118-
Follow the link we've included to go back to the User Voice comments on a suggestion that has been migrated to Developer Community. This link will be available during the transition period for easy reference if you need more context.
119-
120-
### Why can I see three vote counts for a suggestion?
121-
122-
When a suggestion has been imported from User Voice, you'll see three separate vote counts. The two vote counts shown as tags are the vote counts that the idea received originally on User Voice. The third vote count displayed to the left of the suggestion lets you see how many votes the suggestion is getting from Developer Community.
123-
124-
The voting system in User Voice operates differently from the votes in Developer Community. To maintain integrity of Developer Community vote counts and avoid skewing the data, we decided to show the User Voice vote counts prominently as a tag (instead of votes) for each suggestion.
125-
126-
### How long can I expect actions to take?
127-
128-
We're fully committed to listening to your feature suggestions and taking actions to provide valuable experiences to our customers. Actions on suggestions are prioritized based on impact to the broader community. Even if we can't respond personally to every suggestion, we'll make sure that your feedback gets to the right team and is evaluated carefully.
129-
130-
The response time depends on the status your feedback is in. Please review the explanation of statuses in this document to understand the response times.
131-
13294
## See also
13395

13496
- [Introducing 'Suggest a Feature' in Developer Community (Visual Studio blog)](https://devblogs.microsoft.com/visualstudio/introducing-suggest-a-feature-in-developer-community/?utm_source=vs_developer_news&utm_medium=referral)

docs/msbuild/msbuild.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: MSBuild | Microsoft Docs
33
description: Learn about how the Microsoft Build Engine (MSBuild) platform provides a project file with an XML schema to control builds.
44
ms.custom: SEO-VS-2020
5-
ms.date: 11/04/2016
5+
ms.date: 08/11/2021
66
ms.topic: conceptual
77
helpviewer_keywords:
88
- MSBuild, about MSBuild
@@ -65,6 +65,8 @@ MSBuild.exe MyProj.proj -property:Configuration=Debug
6565

6666
MSBuild uses an XML-based project file format that's straightforward and extensible. The MSBuild project file format lets developers describe the items that are to be built, and also how they are to be built for different operating systems and configurations. In addition, the project file format lets developers author reusable build rules that can be factored into separate files so that builds can be performed consistently across different projects in the product.
6767

68+
The Visual Studio build system stores project-specific logic in the your project file itself, and uses imported MSBuild XML files with extensions like *.props* and *.targets* to define the standard build logic. The *.props* files define MSBuild properties, and *.targets* files define MSBuild targets. These imports are sometimes visible in the Visual Studio project file, but in newer projects such as .NET Core, .NET 5 and .NET 6 projects, you don't see the imports in the project file; instead, you see an SDK reference. These are called SDK-style projects. When you reference an SDK such as the .NET SDK, the imports of .props and .target files are implicitly specified by the SDK.
69+
6870
The following sections describe some of the basic elements of the MSBuild project file format. For a tutorial about how to create a basic project file, see [Walkthrough: Creating an MSBuild project file from scratch](../msbuild/walkthrough-creating-an-msbuild-project-file-from-scratch.md).
6971

7072
### <a name="BKMK_Properties"></a> Properties
@@ -161,9 +163,7 @@ MSBuild.exe MyProj.proj -property:Configuration=Debug
161163

162164
These are some of the benefits of multitargeting:
163165

164-
- You can develop applications that target earlier versions of .NET Framework, for example, versions 2.0, 3.0, and 3.5.
165-
166-
- You can target frameworks other than .NET Framework, for example, Silverlight.
166+
- You can develop applications that target earlier versions of .NET Framework, for example, versions 3.5 and 4.7.2.
167167

168168
- You can target a *framework profile*, which is a predefined subset of a target framework.
169169

docs/test/getting-started-with-unit-testing.md

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Get started with unit testing
33
description: Use Visual Studio to define and run unit tests to maintain code health, and to find errors and faults before your customers do.
44
ms.custom: SEO-VS-2020
5-
ms.date: 12/22/2020
5+
ms.date: 08/10/2021
66
ms.topic: tutorial
77
helpviewer_keywords:
88
- unit testing, create unit test plans
@@ -17,16 +17,17 @@ ms.workload:
1717

1818
Use Visual Studio to define and run unit tests to maintain code health, ensure code coverage, and find errors and faults before your customers do. Run your unit tests frequently to make sure your code is working properly.
1919

20-
In this article, the code and illustrations use C#, but the concepts and features apply to .NET languages, C++, Python, JavaScript, and TypeScript.
20+
In this article, the code uses C# and C++, illustrations are in C#, but the concepts and features apply to .NET languages, C++, Python, JavaScript, and TypeScript.
2121

2222
## Create unit tests
2323

2424
This section describes how to create a unit test project.
2525

2626
1. Open the project that you want to test in Visual Studio.
2727

28-
For the purposes of demonstrating an example unit test, this article tests a simple "Hello World" C# project named **HelloWorldCore**. The sample code for such a project is as follows:
28+
For the purposes of demonstrating an example unit test, this article tests a simple "Hello World" C# or C++ Console project named **HelloWorld** (**HelloWorldCore** in C#). The sample code for such a project is as follows:
2929

30+
### [.NET](#tab/dotnet)
3031
```csharp
3132
namespace HelloWorldCore
3233

@@ -39,14 +40,25 @@ This section describes how to create a unit test project.
3940
}
4041
```
4142

43+
### [C++](#tab/cpp)
44+
```cpp
45+
#include <iostream>
46+
47+
int main()
48+
{
49+
std::cout << "Hello World!\n";
50+
}
51+
```
52+
---
53+
4254
1. In **Solution Explorer**, select the solution node. Then, from the top menu bar, select **File** > **Add** > **New Project**.
4355
44-
1. In the new project dialog box, find a unit test project template for the test framework you want to use, such as MSTest, and select it.
56+
1. In the new project dialog box, find a unit test project template for the test framework you want to use, such as MSTest (C#) or the **Native Unit Test** project (C++), and select it.
4557
46-
Starting in Visual Studio 2017 version 14.8, the .NET languages include built-in templates for NUnit and xUnit. For C++, you will need to select a test framework supported by the language. For Python, see [Set up unit testing in Python code](../python/unit-testing-python-in-visual-studio.md) to set up your test project.
58+
Starting in Visual Studio 2017 version 14.8, the .NET languages include built-in templates for NUnit and xUnit. For C++, in this example select the **Native Unit Test** project, which uses Microsoft Native Unit Test Framework. (To use a different C++ test frameworks, see [Writing unit tests for C/C++](../test/writing-unit-tests-for-c-cpp.md)). For Python, see [Set up unit testing in Python code](../python/unit-testing-python-in-visual-studio.md) to set up your test project.
4759
4860
> [!TIP]
49-
> For C#, you can create unit test projects from code using a faster method. For more information, see [Create unit test projects and test methods](../test/unit-test-basics.md#create-unit-test-projects-and-test-methods). To use this method with .NET Core or .NET Standard, Visual Studio 2019 is required.
61+
> For C# only, you can create unit test projects from code using a faster method. For more information, see [Create unit test projects and test methods](../test/unit-test-basics.md#create-unit-test-projects-and-test-methods). To use this method with .NET Core or .NET Standard, Visual Studio 2019 is required.
5062
5163
The following illustration shows an MSTest unit test, which is supported in .NET.
5264
@@ -78,7 +90,7 @@ This section describes how to create a unit test project.
7890
7991
1. Add code to the unit test method.
8092
81-
For example, you might use the following code by selecting the correct documentation tab that matches your test framework: MSTest, NUnit, or xUnit (supported on .NET only).
93+
For example, you might use the following code by selecting the correct documentation tab that matches your test framework: MSTest, NUnit, or xUnit (supported on .NET only), or C++ Microsoft Unit Testing Framework.
8294
8395
### [MSTest](#tab/mstest)
8496
@@ -170,6 +182,44 @@ This section describes how to create a unit test project.
170182
}
171183
```
172184

185+
### [Microsoft Native Unit Test Framework](#tab/msunittest)
186+
187+
```cpp
188+
#include "pch.h"
189+
#include "CppUnitTest.h"
190+
#include "../HelloWorldUnitTestCPP/HelloWorldUnitTestCPP.cpp" // Update using your project name
191+
192+
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
193+
194+
namespace HelloWorldTests
195+
{
196+
TEST_CLASS(HelloWorldTests)
197+
{
198+
public:
199+
200+
TEST_METHOD(TestMethod)
201+
{
202+
std::string expected = "Hello World!\n";
203+
204+
std::stringstream buffer;
205+
std::streambuf* sbuf = std::cout.rdbuf(); // Save cout's buffer
206+
std::cout.rdbuf(buffer.rdbuf()); // Redirect cout to the stringstream buffer
207+
208+
// Call main() in your test
209+
int result = main();
210+
211+
// When finished, redirect cout to the original buffer
212+
std::cout.rdbuf(sbuf);
213+
std::cout << "std original buffer: \n";
214+
std::cout << buffer.get();
215+
216+
// Test
217+
Assert::AreEqual(expected, buffer.str());
218+
}
219+
};
220+
}
221+
```
222+
173223
---
174224

175225
## Run unit tests
@@ -199,7 +249,7 @@ This section describes how to create a unit test project.
199249
If you are using the MSTest, xUnit, or NUnit testing framework in Visual Studio 2017 or later, you can see live results of your unit tests.
200250

201251
> [!NOTE]
202-
> To follow these steps, Visual Studio Enterprise is required.
252+
> To follow these steps, Visual Studio Enterprise is required, along with .NET code and one of the following test frameworks: MSTest, xUnit, or NUnit.
203253
204254
1. Turn live unit testing from the **Test** menu by choosing **Test** > **Live Unit Testing** > **Start**.
205255

@@ -227,13 +277,13 @@ For more information about live unit testing, see [Live unit testing](../test/li
227277

228278
## Use a third-party test framework
229279

230-
You can run unit tests in Visual Studio by using third-party test frameworks such as Boost, Google, and NUnit, depending on your programming language. To use a third-party framework:
280+
You can run unit tests in Visual Studio by using third-party test frameworks such as NUnit, Boost, or Google C++ Testing Framework, depending on your programming language. To use a third-party framework:
231281

232282
- Use the **NuGet Package Manager** to install the NuGet package for the framework of your choice.
233283

234284
- (.NET) Starting in Visual Studio 2017 version 14.6, Visual Studio includes pre-configured test project templates for NUnit and xUnit test frameworks. The templates also include the necessary NuGet packages to enable support.
235285

236-
- (C++) In Visual Studio 2017 and later versions, some frameworks like Boost are already included. For more information, see [Write unit tests for C/C++ in Visual Studio](../test/writing-unit-tests-for-c-cpp.md).
286+
- (C++) In Visual Studio 2017 and later versions, some frameworks like Google C++ Testing Framework are already included. For more information, see [Write unit tests for C/C++ in Visual Studio](../test/writing-unit-tests-for-c-cpp.md).
237287

238288
To add a unit test project:
239289

@@ -280,3 +330,6 @@ To add a unit test project:
280330
281331
> [!div class="nextstepaction"]
282332
> [Create and run unit tests for managed code](walkthrough-creating-and-running-unit-tests-for-managed-code.md)
333+
334+
> [!div class="nextstepaction"]
335+
> [Write unit tests for C/C++](../test/writing-unit-tests-for-c-cpp.md)

0 commit comments

Comments
 (0)