Skip to content

Commit

Permalink
Merge pull request #4275 from MicrosoftDocs/master
Browse files Browse the repository at this point in the history
3/27/2019 AM Publish
  • Loading branch information
Taojunshen authored Mar 27, 2019
2 parents 8d453b3 + ba33722 commit d78821f
Show file tree
Hide file tree
Showing 24 changed files with 186 additions and 62 deletions.
17 changes: 11 additions & 6 deletions docs/code-quality/use-roslyn-analyzers.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Analyzer rule severity and suppression
ms.date: 03/26/2018
ms.date: 03/26/2019
ms.topic: conceptual
helpviewer_keywords:
- "code analysis, managed code"
Expand Down Expand Up @@ -40,12 +40,17 @@ The icons next to each diagnostic in **Solution Explorer** correspond to the ico

## Rule sets

A [rule set](../code-quality/using-rule-sets-to-group-code-analysis-rules.md) is an XML file that stores the severity and suppression state for individual diagnostics. Rule sets apply to a single project, and a project can have multiple rule sets. To view the active rule set in the editor, right-click on the **Analyzers** node in **Solution Explorer** and select **Open Active Rule Set**. If this is the first time you are accessing the rule set, a file named *\<projectname>.ruleset* is added to the project and appears in **Solution Explorer**.
A [rule set](../code-quality/using-rule-sets-to-group-code-analysis-rules.md) is an XML file that stores the severity and suppression state for individual diagnostics.

> [!NOTE]
> Rule sets include both static (binary) code analysis and Roslyn analyzer rules.
> Rule sets can include rules from both static (binary) code analysis and Roslyn analyzers.
You can change the active rule set for a project on the **Code Analysis** tab of a project's properties. Select the rule set in the **Run this rule set** drop-down list. You can also open the rule set from the **Code Analysis** property page by selecting **Open**.
To edit the active rule set in the rule set editor, right-click on the **References** > **Analyzers** node in **Solution Explorer** and select **Open Active Rule Set**. If this is the first time you're editing the rule set, Visual Studio makes a copy of the default rule set file, names it *\<projectname>.ruleset*, and adds it to your project. This custom rule set also becomes the active rule set for your project.

To change the active rule set for a project, navigate to the **Code Analysis** tab of a project's properties. Select the rule set from the list under **Run this rule set**. To open the rule set, select **Open**.

> [!NOTE]
> .NET Core and .NET Standard projects do not support the menu commands for rule sets in **Solution Explorer**, for example, **Open Active Rule Set**. To specify a non-default rule set for a .NET Core or .NET Standard project, manually [add the **CodeAnalysisRuleSet** property to the project file](using-rule-sets-to-group-code-analysis-rules.md#specify-a-rule-set-for-a-project). You can configure the rules within the rule set in the Visual Studio rule set editor UI.
## Rule severity

Expand Down Expand Up @@ -73,7 +78,7 @@ You can change the severity of a rule from **Solution Explorer**, or within the

![Rule set file in Solution Explorer](media/ruleset-in-solution-explorer.png)

### To set rule severity from Solution Explorer
### Set rule severity from Solution Explorer

1. In **Solution Explorer**, expand **References** > **Analyzers** (**Dependencies** > **Analyzers** for .NET Core projects).

Expand All @@ -83,7 +88,7 @@ You can change the severity of a rule from **Solution Explorer**, or within the

The severity for the rule is saved in the active rule set file.

### To set rule severity in the rule set file
### Set rule severity in the rule set file

1. Open the [rule set](analyzer-rule-sets.md) file by double-clicking it in **Solution Explorer**, selecting **Open Active Rule Set** on the right-click menu of the **Analyzers** node, or by selecting **Open** on the **Code Analysis** property page for the project.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ ms.workload:
---
# Use rule sets to group code analysis rules

When you configure code analysis in Visual Studio, you can choose from a list of built-in *rule sets*. A rule set applies to a project, and is a grouping of code analysis rules that identify targeted issues and specific conditions for that project. For example, you can apply a rule set that is designed to scan code for publicly available APIs, or just the minimum recommended rules. You can also apply a rule set that includes all the rules.
When you configure code analysis in Visual Studio, you can choose from a list of built-in *rule sets*. A rule set is a grouping of code analysis rules that identify targeted issues and specific conditions for that project. For example, you can apply a rule set that's designed to scan code for publicly available APIs. You can also apply a rule set that includes all the available rules.

You can customize a rule set by adding or deleting rules, or by changing rule severities to appear as either warnings or errors in the **Error List**. Customized rule sets can fulfill a need for your particular development environment. When you customize a rule set, the rule set editor provides search and filtering tools to help you in the process.
You can customize a rule set by adding or deleting rules or by changing rule severities to appear as either warnings or errors in the **Error List**. Customized rule sets can fulfill a need for your particular development environment. When you customize a rule set, the rule set editor provides search and filtering tools to help you in the process.

Rule sets are available for [static analysis of managed code](how-to-configure-code-analysis-for-a-managed-code-project.md), [analysis of C++ code](using-rule-sets-to-specify-the-cpp-rules-to-run.md), and [Roslyn analyzers](analyzer-rule-sets.md).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
title: Deploy an ASP.NET Docker container to Azure Container Registry (ACR) | Microsoft Docs
description: Learn how to use Visual Studio Tools for Docker to deploy an ASP.NET Core web app to a container registry
ms.prod: ""
services: azure-container-service
author: ghogen
manager: jillfra
ms.assetid: e5e81c5e-dd18-4d5a-a24d-a932036e78b9
ms.devlang: dotnet
ms.topic: article
ms.topic: conceptual
ms.technology: vs-azure
ms.date: 03/14/2019
ms.author: ghogen
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 19 additions & 12 deletions docs/get-started/visual-basic/tutorial-wpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: Create a simple Windows Desktop .NET app in Visual Basic with Visua
ms.custom: "seodec18, get-started"
ms.date: 03/14/2019
ms.technology: vs-ide-general
ms.prod: visual-studio-windows
ms.topic: conceptual
dev_langs:
- "VB"
Expand All @@ -19,10 +20,15 @@ ms.workload:
By completing this tutorial, you'll become familiar with many of the tools, dialog boxes, and designers that you can use when you develop applications with Visual Studio. You'll create a "Hello, World" application, design the UI, add code, and debug errors, while you learn about working in the integrated development environment ([IDE](visual-studio-ide.md)).

::: moniker range="vs-2017"

If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2017) page to install it for free.

::: moniker-end

::: moniker range=">=vs-2019"

If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019+rc) page to install it for free.

::: moniker-end

## Configure the IDE
Expand All @@ -49,35 +55,36 @@ When you launch Visual Studio, the start window opens first. Select **Continue w

When you create an application in Visual Studio, you first create a project and a solution. For this example, you'll create a Windows Presentation Foundation (WPF) project.

::: moniker range="vs-2017"

1. Create a new project. On the menu bar, select **File** > **New** > **Project**.

::: moniker range="vs-2017"
![On the menu bar, choose File, New, Project](../media/exploreide-filenewproject.png)
::: moniker-end
::: moniker range=">=vs-2019"
![On the menu bar, choose File, New, Project](../media/vs-2019/exploreide-filenewproject-vs2019.png)
::: moniker-end

::: moniker range="vs-2017"
2. In the **New Project** dialog, select the **Installed** > **Visual Basic** > **Windows Desktop** category, and then select the **WPF App (.NET Framework)** template. Name the project **HelloWPFApp**, and select **OK**.

![WPF app template in Visual Studio New Project dialog](media/exploreide-newproject-vb.png)

Visual Studio creates the HelloWPFApp project and solution, and **Solution Explorer** shows the various files. The **WPF Designer** shows a design view and a XAML view of *MainWindow.xaml* in a split view. You can slide the splitter to show more or less of either view. You can choose to see only the visual view or only the XAML view. The following items appear in **Solution Explorer**:

![Solution Explorer with HelloWPFApp files loaded](../media/exploreide-hellowpfappfiles.png)

::: moniker-end
::: moniker range=">=vs-2019"

::: moniker range="vs-2019"

1. Open Visual Studio 2019.

2. On the **Create a new project** screen, search for "WPF", and choose **WPF App (.NET Framework)**, and then choose **Next**.

![WPF app template in Visual Studio New Project dialog](media/vs-2019/exploreide-newprojectvb-vs2019.png)

3. At the next screen, give the project a name, **HelloWPFApp**, and choose **Create**.
::: moniker-end

Visual Studio creates the HelloWPFApp project and solution, and **Solution Explorer** shows the various files. The **WPF Designer** shows a design view and a XAML view of *MainWindow.xaml* in a split view. You can slide the splitter to show more or less of either view. You can choose to see only the visual view or only the XAML view. The following items appear in **Solution Explorer**:

::: moniker range="vs-2017"
![Solution Explorer with HelloWPFApp files loaded](../media/exploreide-hellowpfappfiles.png)
::: moniker-end
::: moniker range=">=vs-2019"
![Solution Explorer with HelloWPFApp files loaded](../media/vs-2019/exploreide-hellowpfappfiles.png)

::: moniker-end

> [!NOTE]
Expand Down
65 changes: 59 additions & 6 deletions docs/ide/create-a-visual-basic-winform-in-visual-studio.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
title: "Create a Windows Forms app with Visual Basic"
description: "Learn how to create a Windows Forms app in Visual Studio with Visual Basic, step-by-step."
ms.date: 12/04/2017
ms.topic: conceptual
ms.date: 03/23/2019
ms.topic: tutorial
ms.prod: visual-studio-windows
ms.technology: vs-ide-general
ms.devlang: vb
author: TerryGLee
ms.author: tglee
Expand All @@ -16,12 +18,27 @@ ms.workload:

In this short introduction to the Visual Studio integrated development environment (IDE), you'll create a simple Visual Basic application that has a Windows-based user interface (UI).

If you haven't already installed Visual Studio, go to the [Visual Studio Downloads](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2017) page to install it for free.
::: moniker range="vs-2017"

If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2017) page to install it for free.

::: moniker-end

::: moniker range="vs-2019"

If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019+rc) page to install it for free.

> [!NOTE]
> Some of the screenshots in this tutorial use the dark theme. If you aren't using the dark theme but would like to, see the [Personalize the Visual Studio IDE and Editor](../ide/quickstart-personalize-the-ide.md) page to learn how.
::: moniker-end

## Create a project

First, you'll create a Visual Basic application project. The project type comes with all the template files you'll need, before you've even added anything.

::: moniker range="vs-2017"

1. Open Visual Studio 2017.

2. From the top menu bar, choose **File** > **New** > **Project**.
Expand All @@ -32,6 +49,41 @@ First, you'll create a Visual Basic application project. The project type comes

![.NET Core workload in the Visual Studio Installer](../ide/media/install-dot-net-desktop-env.png)

::: moniker-end

::: moniker range="vs-2019"

1. Open Visual Studio 2019.

1. On the start window, choose **Create a new project**.

![View the 'Create a new project' window](../get-started/media/vs-2019/create-new-project-dark-theme.png)

1. On the **Create a new project** window, enter or type *Windows Forms* in the search box. Next, choose **Visual Basic** from the Language list, and then choose **Windows** from the Platform list.

After you apply the language and platform filters, choose the **Windows Forms App (.NET Framework)** template, and then choose **Next**.

![Choose the Visual Basic template for the Windows Forms App (.NET Framework)](../get-started/visual-basic/media/vs-2019/vb-create-new-project-search-winforms-filtered.png)

> [!NOTE]
> If you do not see the **Windows Forms App (.NET Framework)** template, you can install it from the **Create a new project** window. In the **Not finding what you're looking for?** message, choose the **Install more tools and features** link.
>
> ![The 'Install more tools and features' link from the 'Not finding what you're looking for' message in the 'Create new project' window](../get-started/media/vs-2019/not-finding-what-looking-for.png)
>
> Next, in the Visual Studio Installer, choose the Choose the **.NET desktop development** workload.
>
> ![.NET Core workload in the Visual Studio Installer](../ide/media/install-dot-net-desktop-env.png)
>
> After that, choose the **Modify** button in the Visual Studio Installer. You might be prompted to save your work; if so, do so. Next, choose **Continue** to install the workload. Then, return to step 2 in this "[Create a project](#create-a-project)" procedure.
1. In the **Configure your new project** window, type or enter *HelloWorld* in the **Project name** box. Then, choose **Create**.

![in the 'Configure your new project' window, name your project 'HelloWorld'](../get-started/visual-basic/media/vs-2019/vb-name-your-winform-project-helloworld.png)

Visual Studio opens your new project.

::: moniker-end

## Create the application

After you select your Visual Basic project template and name your file, Visual Studio opens a form for you. A form is a Windows user interface. We'll create a "Hello World" application by adding controls to the form, and then we'll run the application.
Expand All @@ -42,16 +94,17 @@ After you select your Visual Basic project template and name your file, Visual S

![Click the Toolbox to open the Toolbox window](../ide/media/vb-toolbox-toolwindow.png)

(If you don't see the **Toolbox** fly-out option, you can open it from the menu bar. To do so, click **View** > **Toolbox**. Or, press **Ctrl**+**Alt**+**X**.)
(If you don't see the **Toolbox** fly-out option, you can open by pressing **Ctrl**+**Alt**+**X**.)

2. Click the **Pin** icon to dock the **Toolbox** window.

![Click the Pin icon to pin the Toolbox window to the IDE](../ide/media/vb-pin-the-toolbox-window.png)

3. Click the **Button** control and then drag it onto the form.

![Add a button to the form](../ide/media/vb-add-a-button-to-form1.png)

4. In the **Appearance** section of the **Properties** window, type `Click this`, and then press **Enter**.
4. In the **Appearance** section (or the **Fonts** section) of the **Properties** window, type `Click this`, and then press **Enter**.

![Add text to the button on the form](../ide/media/vb-button-control-text.png)

Expand All @@ -75,7 +128,7 @@ Now that we've added a button control to create an action, let's add a label con

(Alternatively, you can expand **Form1.vb** in **Solution Explorer**, and then click **Form1**.)

2. In the **Form1.vb** window, between the **Private Sub** line and the **End Sub** line, type or paste `lblHelloWorld.Text = "Hello World!"`.
2. In the **Form1.vb** window, between the **Private Sub** line and the **End Sub** line (or between the **Public Class Form1** line and the **End Class** line), type the following code.

![Add code to the form](../ide/media/vb-add-code-to-the-form.png)

Expand Down
Loading

0 comments on commit d78821f

Please sign in to comment.