Skip to content

Commit 03a74d2

Browse files
authored
Merge pull request #1204 from MicrosoftDocs/master
1/2 AM Publish
2 parents 32f1a69 + e6d7666 commit 03a74d2

9 files changed

+105
-82
lines changed

docs/code-quality/codesnippet/CSharp/ca2233-operations-should-not-overflow_2.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ public static class Calculator
77
public static int Decrement(int input)
88
{
99
if (input == int.MinValue)
10-
throw new ArgumentOutOfRangeException("input", "input must be greater than Int32.MinValue");
10+
throw new ArgumentOutOfRangeException(nameof(input), "input must be greater than Int32.MinValue");
1111

1212
input--;
1313
return input;
1414
}
1515
}
16-
}
16+
}

docs/debugger/how-to-use-the-threads-window.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ To begin this tutorial, you need a multithreaded application project. Follow the
5555

5656
```VB
5757
Thread.Sleep(3000)
58-
Console.WriteLine(
58+
Console.WriteLine()
5959
```
6060

6161
```CSharp
@@ -259,4 +259,4 @@ You can freeze and thaw (suspend and resume) threads to control the order in whi
259259

260260
## See Also
261261
[Debug Multithreaded Applications](../debugger/debug-multithreaded-applications-in-visual-studio.md)
262-
[How to: Switch to Another Thread While Debugging](../debugger/how-to-switch-to-another-thread-while-debugging.md)
262+
[How to: Switch to Another Thread While Debugging](../debugger/how-to-switch-to-another-thread-while-debugging.md)

docs/debugger/walkthrough-writing-a-visualizer-in-csharp.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ ms.tgt_pltfrm: ""
1010
ms.topic: "article"
1111
dev_langs:
1212
- "CSharp"
13-
- "VB"
14-
- "FSharp"
15-
- "C++"
1613
helpviewer_keywords:
1714
- "visualizers, writing"
1815
- "walkthroughs [Visual Studio], visualizers"
@@ -67,7 +64,7 @@ Follow the tasks below to create a visualizer.
6764

6865
6. In DebuggerSide.cs, add the following statement to the `using` statements:
6966

70-
```
67+
```csharp
7168
using Microsoft.VisualStudio.DebuggerVisualizers;
7269
```
7370

@@ -77,13 +74,13 @@ Follow the tasks below to create a visualizer.
7774

7875
1. In DebuggerSide.cs, go to the following line of code:
7976

80-
```
77+
```csharp
8178
public class DebuggerSide
8279
```
8380

8481
2. Change the code to:
8582

86-
```
83+
```csharp
8784
public class DebuggerSide : DialogDebuggerVisualizer
8885
```
8986

@@ -93,8 +90,8 @@ Follow the tasks below to create a visualizer.
9390

9491
- In `public class DebuggerSide`, add the following **method:**
9592

96-
```
97-
override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
93+
```csharp
94+
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
9895
{
9996
}
10097
```
@@ -111,7 +108,7 @@ Follow the tasks below to create a visualizer.
111108

112109
4. In DebuggerSide.cs, add the following statement to the `using` statements:
113110

114-
```
111+
```csharp
115112
using System.Windows.Forms;
116113
```
117114

@@ -121,7 +118,7 @@ Follow the tasks below to create a visualizer.
121118

122119
1. In the `Show` method, add the following line of code:
123120

124-
```
121+
```csharp
125122
MessageBox.Show(objectProvider.GetObject().ToString());
126123
```
127124

@@ -135,12 +132,12 @@ Follow the tasks below to create a visualizer.
135132

136133
1. Add the following attribute code to DebuggerSide.cs, after the `using` statements but before `namespace MyFirstVisualizer`:
137134

138-
```
135+
```csharp
139136
[assembly:System.Diagnostics.DebuggerVisualizer(
140137
typeof(MyFirstVisualizer.DebuggerSide),
141138
typeof(VisualizerObjectSource),
142-
Target = typeof(System.String),
143-
Description = "My First Visualizer")]
139+
Target = typeof(System.String),
140+
Description = "My First Visualizer")]
144141
```
145142

146143
2. On the **Build** menu, choose **Build MyFirstVisualizer**. The project should build successfully. Correct any build errors before continuing.
@@ -151,7 +148,7 @@ Follow the tasks below to create a visualizer.
151148

152149
1. Add the following method to class `public DebuggerSide`:
153150

154-
```
151+
```csharp
155152
public static void TestShowVisualizer(object objectToVisualize)
156153
{
157154
VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof(DebuggerSide));
@@ -201,13 +198,13 @@ Follow the tasks below to create a visualizer.
201198

202199
3. In TestConsole.cs, add the following code to the `using` statements:
203200

204-
```
201+
```csharp
205202
using MyFirstVisualizer;
206203
```
207204

208205
4. In method `Main`, add the following code:
209206

210-
```
207+
```csharp
211208
String myString = "Hello, World";
212209
DebuggerSide.TestShowVisualizer(myString);
213210
```

docs/designers/walkthrough-my-first-wpf-desktop-application2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ In this section, you'll create the application infrastructure, which includes th
266266
267267
1. Choose the following image and save it as `watermark.png`.
268268
269-
![Watermark image for walkthrough](../designers/media/wpf_watermark.png "WPF_watermark")
269+
![Watermark image for walkthrough](../designers/media/wpf_watermark.png "watermark")
270270
271271
> [!NOTE]
272272
> Alternatively you can create your own image and save it as `watermark.png`.
@@ -885,4 +885,4 @@ In this section, you'll create the application infrastructure, which includes th
885885
- [Documents in WPF](/dotnet/framework/wpf/advanced/documents-in-wpf)
886886

887887
## See Also
888-
[Create Modern Desktop Applications with Windows Presentation Foundation](../designers/create-modern-desktop-applications-with-windows-presentation-foundation.md)
888+
[Create Modern Desktop Applications with Windows Presentation Foundation](../designers/create-modern-desktop-applications-with-windows-presentation-foundation.md)

docs/ide/how-to-create-multi-project-templates.md

Lines changed: 71 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -22,69 +22,95 @@ ms.workload:
2222
---
2323
# How to: Create Multi-Project Templates
2424
Multi-project templates act as containers for two or more projects. When a project based on a multi-project template is created from the **New Project** dialog box, every project in the template is added to the solution.
25+
26+
A multi-project template is two-or more project templates along with a root template of type `ProjectGroup`.
27+
28+
Multi-project templates also behave differently than normal templates. Multi-project templates have the following unique characteristics:
2529

26-
A multi-project template must include the following items, compressed into a .zip file:
27-
28-
- A root .vstemplate file for the entire multi-project template. This root .vstemplate file contains the metadata that the **New Project** dialog box displays, and specifies where to find the .vstemplate files for the projects in this template. This file must be located at the root of the .zip file.
29-
30-
- One or more folders that contain the files that are required for a complete project template. This includes all code files for the project, and also a .vstemplate file for the project.
30+
- Individual projects in a multi-project template cannot be assigned names by the **New Project** dialog box. Instead, use the `ProjectName` attribute on the `ProjectTemplateLink` element to specify the name for each project. For more information, see the first example in the following section.
3131

32-
For example, a multi-project template .zip file that has two projects could have the following files and directories:
32+
- Multi-project templates can contain projects written in different languages, but the entire template itself can only be put in one category by using the `ProjectType` element.
3333

34-
MultiProjectTemplate.vstemplate
34+
### To create a multi-project template
3535

36-
\Project1\Project1.vstemplate
36+
1. Create the projects to include in the multi-project template:
37+
1. Create a project.
3738

38-
\Project1\Project1.vbproj
39+
> [!NOTE]
40+
> Use only valid identifier characters when naming a project that will be the source for a template. A template exported from a project named with invalid characters can cause compilation errors in future projects based on the template. For more information on valid identifier characters, see [Declared Element Names](/dotnet/visual-basic/programming-guide/language-features/declared-elements/declared-element-names).
3941
40-
\Project1\Class.vb
42+
2. Edit the project until it is ready to be exported as a template.
4143

42-
\Project2\Project2.vstemplate
44+
3. As appropriate, edit the code files to indicate where parameter replacement should take place. For more information on parameter replacement, see [How to: Substitute Parameters in a Template](../ide/how-to-substitute-parameters-in-a-template.md).
4345

44-
\Project2\Project2.vbproj
46+
4. On the **Project** menu, click **Export Template**. The **Export Template** wizard opens.
4547

46-
\Project2\Class.vb
48+
5. Click **Project Template**.
4749

48-
The root .vstemplate file for a multi-project template differs from a single-project template in the following ways:
50+
6. If you have more than one project in your current solution, select the projects you want to export to a template.
4951

50-
- The `Type` attribute of the `VSTemplate` element contains the value `ProjectGroup`. For example:
52+
7. Click **Next**.
5153

52-
```
53-
<VSTemplate Version="2.0.0" Type="ProjectGroup"
54-
xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
55-
```
54+
8. Select an icon and a preview image for your template. These will appear in the **New Project** dialog box.
5655

57-
- The `TemplateContent` element contains a `ProjectCollection` element that has one or more `ProjectTemplateLink` elements that define the paths to the .vstemplate files of the included projects. For example:
56+
9. Enter a template name and description.
5857

59-
```
60-
<TemplateContent>
61-
<ProjectCollection>
62-
<ProjectTemplateLink>
63-
Project1\Project1.vstemplate
64-
</ProjectTemplateLink>
65-
<ProjectTemplateLink>
66-
Project2\Project2.vstemplate
67-
</ProjectTemplateLink>
68-
</ProjectCollection>
69-
</TemplateContent>
70-
```
71-
72-
Multi-project templates also behave differently than normal templates. Multi-project templates have the following unique characteristics:
73-
74-
- Individual projects in a multi-project template cannot be assigned names by the **New Project** dialog box. Instead, use the `ProjectName` attribute on the `ProjectTemplateLink` element to specify the name for each project. For more information, see the first example in the following section.
75-
76-
- Multi-project templates can contain projects written in different languages, but the entire template itself can only be put in one category by using the `ProjectType` element.
77-
78-
### To create a multi-project template
79-
80-
1. Create the projects to include in the multi-project template.
81-
82-
2. Create .vstemplate files for every project. For more information, see [How to: Create Project Templates](../ide/how-to-create-project-templates.md).
58+
10. Click **Finish**. Your project is exported into a .zip file and placed in the specified output location, and, if selected, imported into [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)].
8359

60+
2. Extract the .vstemplate file from the generated zip file into the same directory as the project file used to export the template.
61+
8462
3. Create a root .vstemplate file that to contain the metadata for the multi-project template. For more information, see the first example in the following section.
8563

8664
4. Select the files and folders to include in your template, right-click the selection, click **Send To**, and then click **Compressed (zipped) Folder**. The files and folders are compressed into a .zip file.
8765

66+
> [NOTE!]
67+
> A multi-project template must include the following items, compressed into a .zip file:
68+
>
69+
> - A root .vstemplate file for the entire multi-project template. This root .vstemplate file contains the metadata that the **New Project** dialog box displays, and specifies where to find the .vstemplate files for the projects in this template. This file must be located at the root of the .zip file.
70+
>
71+
> - One or more folders that contain the files that are required for a complete project template. This includes all code files for the project, and also a .vstemplate file for the project.
72+
>
73+
> For example, a multi-project template .zip file that has two projects could have the following files and directories:
74+
>
75+
> MultiProjectTemplate.vstemplate
76+
>
77+
> \Project1\Project1.vstemplate
78+
>
79+
> \Project1\Project1.vbproj
80+
>
81+
> \Project1\Class.vb
82+
>
83+
> \Project2\Project2.vstemplate
84+
>
85+
> \Project2\Project2.vbproj
86+
>
87+
> \Project2\Class.vb
88+
>
89+
> The root .vstemplate file for a multi-project template differs from a single-project template in the following ways:
90+
>
91+
> - The `Type` attribute of the `VSTemplate` element contains the value `ProjectGroup`. For example:
92+
>
93+
> ```
94+
> <VSTemplate Version="2.0.0" Type="ProjectGroup"
95+
> xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
96+
> ```
97+
>
98+
> - The `TemplateContent` element contains a `ProjectCollection` element that has one or more `ProjectTemplateLink` elements that define the paths to the .vstemplate files of the included projects. For example:
99+
>
100+
> ```
101+
> <TemplateContent>
102+
> <ProjectCollection>
103+
> <ProjectTemplateLink>
104+
> Project1\Project1.vstemplate
105+
> </ProjectTemplateLink>
106+
> <ProjectTemplateLink>
107+
> Project2\Project2.vstemplate
108+
> </ProjectTemplateLink>
109+
> </ProjectCollection>
110+
> </TemplateContent>
111+
> ```
112+
>
113+
88114
5. Put the .zip template file in the [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] project template directory. By default, this directory is \My Documents\Visual Studio *Version*\Templates\ProjectTemplates\\.
89115

90116
## Example
@@ -153,4 +179,4 @@ Multi-project templates act as containers for two or more projects. When a proje
153179
[How to: Create Project Templates](../ide/how-to-create-project-templates.md)
154180
[Visual Studio Template Schema Reference](../extensibility/visual-studio-template-schema-reference.md)
155181
[SolutionFolder Element (Visual Studio Templates)](../extensibility/solutionfolder-element-visual-studio-templates.md)
156-
[ProjectTemplateLink Element (Visual Studio Templates)](../extensibility/projecttemplatelink-element-visual-studio-templates.md)
182+
[ProjectTemplateLink Element (Visual Studio Templates)](../extensibility/projecttemplatelink-element-visual-studio-templates.md)

docs/ide/synchronized-settings-in-visual-studio.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ By default, the following settings are synchronized.
5050

5151
## Turn off synchronized settings on a particular computer
5252

53-
Synchronized settings for Visual Studio are turned on by default. You can turn off synchronized settings on a computer by going to the **Tools &#124; Options &#124; Environment &#124; Synchronized Settings** page and unchecking the checkbox. For example, if you decide not to synchronize Visual Studio's settings on Computer A, any setting changes made on Computer A do not appear on Computer B or Computer C. Computer B and C will continue to synchronize with each other, but not with Computer A.
53+
Synchronized settings for Visual Studio are turned on by default. You can turn off synchronized settings on a computer by going to the **Tools &#124; Options &#124; Environment &#124; Accounts** page and unchecking the checkbox. For example, if you decide not to synchronize Visual Studio's settings on Computer A, any setting changes made on Computer A do not appear on Computer B or Computer C. Computer B and C will continue to synchronize with each other, but not with Computer A.
5454

5555
## Synchronize settings across Visual Studio family products and editions
5656

docs/msbuild/msbuild-conditions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ms.workload:
3131
|---------------|-----------------|
3232
|'`stringA`' == '`stringB`'|Evaluates to `true` if `stringA` equals `stringB`.<br /><br /> For example:<br /><br /> `Condition="'$(CONFIG)'=='DEBUG'"`<br /><br /> Single quotes are not required for simple alphanumeric strings or boolean values. However, single quotes are required for empty values.|
3333
|'`stringA`' != '`stringB`'|Evaluates to `true` if `stringA` is not equal to `stringB`.<br /><br /> For example:<br /><br /> `Condition="'$(CONFIG)'!='DEBUG'"`<br /><br /> Single quotes are not required for simple alphanumeric strings or boolean values. However, single quotes are required for empty values.|
34-
|\<, >, \<=, >=|Evaluates the numeric values of the operands. Returns `true` if the relational evaluation is true. Operands must evaluate to a decimal or hexadecimal number. Hexadecimal numbers must begin with "0x". **Note:** In XML, the characters `<` and `>` must be escaped. The symbol `<` is represented as `<`. The symbol `>` is represented as `>`.|
34+
|\<, >, \<=, >=|Evaluates the numeric values of the operands. Returns `true` if the relational evaluation is true. Operands must evaluate to a decimal or hexadecimal number. Hexadecimal numbers must begin with "0x". **Note:** In XML, the characters `<` and `>` must be escaped. The symbol `<` is represented as `&lt;`. The symbol `>` is represented as `&gt;`.|
3535
|Exists('`stringA`')|Evaluates to `true` if a file or folder with the name `stringA` exists.<br /><br /> For example:<br /><br /> `Condition="!Exists('$(builtdir)')"`<br /><br /> Single quotes are not required for simple alphanumeric strings or boolean values. However, single quotes are required for empty values.|
3636
|HasTrailingSlash('`stringA`')|Evaluates to `true` if the specified string contains either a trailing backward slash (\\) or forward slash (/) character.<br /><br /> For example:<br /><br /> `Condition="!HasTrailingSlash('$(OutputPath)')"`<br /><br /> Single quotes are not required for simple alphanumeric strings or boolean values. However, single quotes are required for empty values.|
3737
|!|Evaluates to `true` if the operand evaluates to `false`.|
@@ -43,4 +43,4 @@ ms.workload:
4343
## See Also
4444
[MSBuild Reference](../msbuild/msbuild-reference.md)
4545
[Conditional Constructs](../msbuild/msbuild-conditional-constructs.md)
46-
[Walkthrough: Creating an MSBuild Project File from Scratch](../msbuild/walkthrough-creating-an-msbuild-project-file-from-scratch.md)
46+
[Walkthrough: Creating an MSBuild Project File from Scratch](../msbuild/walkthrough-creating-an-msbuild-project-file-from-scratch.md)

0 commit comments

Comments
 (0)