You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/code-quality/code-analysis-for-managed-code-overview.md
+53-51Lines changed: 53 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -4,65 +4,67 @@ ms.custom: ""
4
4
ms.date: "11/04/2016"
5
5
ms.reviewer: ""
6
6
ms.suite: ""
7
-
ms.technology:
8
-
- "vs-ide-code-analysis"
7
+
ms.technology: vs-ide-code-analysis
9
8
ms.tgt_pltfrm: ""
10
9
ms.topic: "article"
11
10
f1_keywords:
12
11
- "vs.projectpropertypages.codeanalysis"
13
12
helpviewer_keywords:
14
13
- "code analysis, managed code"
15
14
- "managed code, code analysis"
16
-
ms.assetid: 12ec0dab-46a4-43d8-984a-440730ef37a9
17
-
caps.latest.revision: 35
18
15
author: "gewarren"
19
16
ms.author: "gewarren"
20
17
manager: ghogen
21
18
---
22
-
# Code Analysis for Managed Code Overview
23
-
Code analysis for managed code analyzes managed assemblies and reports information about the assemblies, such as violations of the programming and design rules set forth in the Microsoft .NET Framework Design Guidelines.
24
-
25
-
The analysis tool represents the checks it performs during an analysis as warning messages. Warning messages identify any relevant programming and design issues and, when it is possible, supply information about how to fix the problem.
26
-
27
-
## IDE (integrated development environment) Integration
28
-
As a developer, you can run code analysis on your project automatically or you can run it manually.
29
-
30
-
To run code analysis each time that you build a project, you select **Enable Code Analysis on Build (defines CODE_ANALYSIS constant)** on the project's Property Page. For more information, see [How to: Enable and Disable Automatic Code Analysis](../code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md).
31
-
32
-
To run code analysis manually on a project, on the **Analyze** menu, click **Run Code Analysis on***ProjectName*. For more information, see [How to: Enable and Disable Automatic Code Analysis](../code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md).
33
-
34
-
## Rule Sets
35
-
Code analysis rules for managed code are grouped into *rule sets*. You can use one of the Microsoft standard rule sets, or you can create a custom rule set to fulfill a specific need. For more information, see [Using Rule Sets to Group Code Analysis Rules](../code-quality/using-rule-sets-to-group-code-analysis-rules.md).
36
-
37
-
## In Source Suppression
38
-
Frequently, it is useful to indicate that a warning is non-applicable. This informs the developer, and other people who might review the code later, that a warning was investigated and then either suppressed or ignored.
39
-
40
-
In Source Suppression of warnings is implemented through custom attributes. To suppress a warning, add the attribute `SuppressMessage` to the source code as shown in the following example:
For more information, see [Suppress Warnings By Using the SuppressMessage Attribute](../code-quality/suppress-warnings-by-using-the-suppressmessage-attribute.md).
53
-
54
-
## Run code analysis as part of check-in policy
55
-
As an organization, you might want to require that all check-ins satisfy certain policies. In particular, you want to make sure that you follow these policies:
56
-
57
-
- There were no build errors in code being checked in.
58
-
59
-
- Code analysis was run as part of the most recent build.
60
-
61
-
You can accomplish this by specifying check-in policies. For more information, see [Enhancing Code Quality with Team Project Check-in Policies](../code-quality/enhancing-code-quality-with-team-project-check-in-policies.md).
62
-
63
-
## Team Build Integration
64
-
You can use the integrated features of the build system to run the analysis tool as part of the build process. For more information, see [Build and release](/vsts/build-release/index).
65
-
66
-
## See Also
67
-
[Using Rule Sets to Group Code Analysis Rules](../code-quality/using-rule-sets-to-group-code-analysis-rules.md)
68
-
[How to: Enable and Disable Automatic Code Analysis](../code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md)
19
+
# Code analysis for managed code overview
20
+
21
+
Code analysis for managed code analyzes managed assemblies and reports information about the assemblies, such as violations of the programming and design rules set forth in the Microsoft .NET Framework Design Guidelines.
22
+
23
+
The analysis tool represents the checks it performs during an analysis as warning messages. Warning messages identify any relevant programming and design issues and, when it is possible, supply information about how to fix the problem.
24
+
25
+
## IDE (integrated development environment) integration
26
+
27
+
You can run code analysis on your project manually or automatically.
28
+
29
+
To run code analysis each time that you build a project, select **Enable Code Analysis on Build** on the project's Property Page. For more information, see [How to: Enable and Disable Automatic Code Analysis](../code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md).
30
+
31
+
To run code analysis manually on a project, from the menu bar choose **Analyze** > **Run Code Analysis** > **Run Code Analysis on <project>**. For more information, see [How to: Enable and Disable Automatic Code Analysis](../code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md).
32
+
33
+
## Rule sets
34
+
35
+
Code analysis rules for managed code are grouped into *rule sets*. You can use one of the Microsoft standard rule sets, or you can create a custom rule set to fulfill a specific need. For more information, see [Using Rule Sets to Group Code Analysis Rules](../code-quality/using-rule-sets-to-group-code-analysis-rules.md).
36
+
37
+
## In source suppression
38
+
39
+
Frequently, it is useful to indicate that a warning is non-applicable. This informs the developer, and other people who might review the code later, that a warning was investigated and then either suppressed or ignored.
40
+
41
+
In source suppression of warnings is implemented through custom attributes. To suppress a warning, add the attribute `SuppressMessage` to the source code as shown in the following example:
For more information, see [Suppress Warnings By Using the SuppressMessage Attribute](../code-quality/suppress-warnings-by-using-the-suppressmessage-attribute.md).
52
+
53
+
## Run code analysis as part of check-in policy
54
+
55
+
As an organization, you might want to require that all check-ins satisfy certain policies. In particular, you want to make sure that you follow these policies:
56
+
57
+
- There are no build errors in code being checked in.
58
+
59
+
- Code analysis is run as part of the most recent build.
60
+
61
+
You can accomplish this by specifying check-in policies. For more information, see [Enhancing Code Quality with Team Project Check-in Policies](../code-quality/enhancing-code-quality-with-team-project-check-in-policies.md).
62
+
63
+
## Team build integration
64
+
65
+
You can use the integrated features of the build system to run the analysis tool as part of the build process. For more information, see [Build and release (VSTS)](/vsts/build-release/index).
66
+
67
+
## See also
68
+
69
+
[Using Rule Sets to Group Code Analysis Rules](../code-quality/using-rule-sets-to-group-code-analysis-rules.md)
70
+
[How to: Enable and Disable Automatic Code Analysis](../code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md)
# Enhancing Code Quality with Team Project Check-in Policies
21
-
When you use Team Foundation Version Control (TFVC), you can create check-in policies for your team projects. to enforce practices that lead to better code and more efficient group development. Check-in policies are rules that are set at the team project level and enforced on developer computers before code is allowed to be checked in.
22
-
23
-
You can specify these team project check-in policies:
24
-
25
-
-**Builds**: Requires that build breaks that were created during a build must be fixed before a new check-in.
26
-
27
-
-**Changeset Comments**: Requires that users provide comments when checking in changes.
28
-
29
-
-**Code Analysis**: Requires that code analysis is run before check-in.
30
-
31
-
-**Work Items**: Requires that one or more work items be associated with the check- in.
32
-
19
+
20
+
When you use Team Foundation Version Control (TFVC), you can create check-in policies for your team projects. to enforce practices that lead to better code and more efficient group development. Check-in policies are rules that are set at the team project level and enforced on developer computers before code is allowed to be checked in.
21
+
22
+
You can specify these team project check-in policies:
23
+
24
+
-**Builds**: Requires that build breaks that were created during a build must be fixed before a new check-in.
25
+
26
+
-**Changeset Comments**: Requires that users provide comments when checking in changes.
27
+
28
+
-**Code Analysis**: Requires that code analysis is run before check-in.
29
+
30
+
-**Work Items**: Requires that one or more work items be associated with the check- in.
31
+
33
32
> [!IMPORTANT]
34
-
> To use check-in policies, you must be connected to [!INCLUDE[vststfsLong](../code-quality/includes/vststfslong_md.md)].
35
-
36
-
## Common Tasks
37
-
38
-
|Task|Supporting Content|
39
-
|----------|------------------------|
40
-
|**Create and use code analysis check-in policies:** You can choose from a standard set of code analysis rules, or you can create a custom set.|[Creating and Using Code Analysis Check-In Policies](../code-quality/creating-and-using-code-analysis-check-in-policies.md)|
41
-
42
-
## Related Tasks
43
-
44
-
|Task|Supporting Content|
45
-
|----------|------------------------|
46
-
|**Use Code Analysis in development process:** Team members run code analysis on their development computers. In Visual Studio, developers configure and run code analysis runs for individual code projects, view and analyze issues found by the runs, and create work items for warnings.|[Analyzing Application Quality](../code-quality/analyzing-application-quality-by-using-code-analysis-tools.md)|
47
-
|**Create and run unit tests:** Unit tests give developers and testers a quick way to look for logic errors in the methods of classes in C#, Visual Basic .NET, and C++ projects. A unit test can be created one time and run every time that source code is changed to make sure that no bugs are introduced.|[Unit Test Your Code](../test/unit-test-your-code.md)|
48
-
|**Track work items and defects:** You can use work items to track and manage both your work and information about your team project. A work item is a database record that [!INCLUDE[esprfound](../code-quality/includes/esprfound_md.md)] uses to track the assignment and progress of work. You can use different types of work items to track different types of work, such as customer requirements, product bugs, and development tasks.|[Work items](/vsts/work/work-items/index)|
49
-
50
-
## External resources
51
-
52
-
### Guidance
53
-
[Testing for Continuous Delivery with Visual Studio 2012 - Chapter 2: Unit Testing: Testing the Inside](http://go.microsoft.com/fwlink/?LinkID=255188)
33
+
> To use check-in policies, you must be connected to [!INCLUDE[vststfsLong](../code-quality/includes/vststfslong_md.md)].
34
+
35
+
## Common Tasks
36
+
37
+
|Task|Supporting Content|
38
+
|----------|------------------------|
39
+
|**Create and use code analysis check-in policies:** You can choose from a standard set of code analysis rules, or you can create a custom set.|[Creating and Using Code Analysis Check-In Policies](../code-quality/creating-and-using-code-analysis-check-in-policies.md)|
40
+
41
+
## Related Tasks
42
+
43
+
|Task|Supporting Content|
44
+
|----------|------------------------|
45
+
|**Use Code Analysis in development process:** Team members run code analysis on their development computers. In Visual Studio, developers configure and run code analysis runs for individual code projects, view and analyze issues found by the runs, and create work items for warnings.|[Analyzing Application Quality](../code-quality/analyzing-application-quality-by-using-code-analysis-tools.md)|
46
+
|**Create and run unit tests:** Unit tests give developers and testers a quick way to look for logic errors in the methods of classes in C#, Visual Basic .NET, and C++ projects. A unit test can be created one time and run every time that source code is changed to make sure that no bugs are introduced.|[Unit Test Your Code](../test/unit-test-your-code.md)|
47
+
|**Track work items and defects:** You can use work items to track and manage both your work and information about your team project. A work item is a database record that [!INCLUDE[esprfound](../code-quality/includes/esprfound_md.md)] uses to track the assignment and progress of work. You can use different types of work items to track different types of work, such as customer requirements, product bugs, and development tasks.|[Work items (VSTS)](/vsts/work/work-items/index)|
48
+
49
+
## External resources
50
+
51
+
[Testing for Continuous Delivery with Visual Studio 2012 - Chapter 2: Unit Testing: Testing the Inside](http://go.microsoft.com/fwlink/?LinkID=255188)
Copy file name to clipboardExpand all lines: docs/code-quality/working-with-code-metrics-data.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ You can select and copy a selected row of code metrics data to the clipboard as
101
101
102
102
You can create a [Visual Studio Team Services (VSTS)](/vsts/index) work item that is based on results in the **Code Metric Results** window. When the work item is created, Visual Studio automatically enters a title in the **Title** field and code metrics data under the **History** tab.
103
103
104
-
For more information about VSTS work items, see [Work items](/vsts/work/work-items/index).
104
+
For more information about VSTS work items, see [Work items (VSTS)](/vsts/work/work-items/index).
Copy file name to clipboardExpand all lines: docs/ide/tutorial-csharp-aspnet-core.md
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ dev_langs:
17
17
---
18
18
19
19
# Getting started with C# and ASP.NET in Visual Studio
20
-
In this tutorial for C# development for ASP.NET Core using Visual Studio, you'll create a C# ASP.NET Core web app, add code to it, explore some features of the IDE, and run the app.
20
+
In this tutorial for C# development with ASP.NET Core using Visual Studio, you'll create a C# ASP.NET Core web app, add code to it, explore some features of the IDE, and run the app.
21
21
22
22
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://aka.ms/vsdownload?utm_source=mscom&utm_campaign=msdocs) page to install it for free.
23
23
@@ -111,7 +111,7 @@ The MVC pattern helps you create apps that are easier to test and update than tr
111
111
112
112
## Run and debug the application
113
113
114
-
1. Choose the **IIS Express** button in the IDE to build and run the app in Debug mode. (Alternatively, you can press **F5**, or you can choose **Debug > Start Debugging** from the menu bar.)
114
+
1. Choose the **IIS Express** button in the IDE to build and run the app in Debug mode. (Alternatively, press **F5**, or choose **Debug > Start Debugging** from the menu bar.)
115
115
116
116

117
117
@@ -152,11 +152,11 @@ The MVC pattern helps you create apps that are easier to test and update than tr
152
152
153
153

154
154
155
-
1. Return to the browser window to see the updated text. (Refresh the browser if you don't see the text you changed.)
155
+
1. Return to the browser window to see the updated text. (Refresh the browser if you don't see the text that you changed.)
156
156
157
157

158
158
159
-
1.Press **Shift**+**F5**to stop debugging. Alternatively, choose**Debug** > **Stop Debugging** from the menu bar, or choose the **Stop Debugging**button from the toolbar.
159
+
1.Choose the **Stop Debugging** button from the toolbar to stop debugging. (Alternatively, press**Shift**+**F5**, or choose **Debug** > **Stop Debugging** from the menu bar.)
160
160
161
161

162
162
@@ -166,3 +166,6 @@ Congratulations on completing this tutorial!
166
166
## See also
167
167
*[Getting started with ASP.NET Core MVC and Visual Studio](/aspnet/core/tutorials/first-mvc-app/start-mvc?tabs=aspnetcore2x)
168
168
*[Getting started with Razor Pages in ASP.NET Core](/aspnet/core/tutorials/razor-pages/razor-pages-start)
169
+
*[What's New in C#](/dotnet/csharp/whats-new)
170
+
*[C# Language Reference](/dotnet/csharp/language-reference/index)
171
+
*[C# Fundamentals for Absolute Beginners](https://mva.microsoft.com/en-US/training-courses/c-fundamentals-for-absolute-beginners-16169) video course
Copy file name to clipboardExpand all lines: docs/ide/tutorial-visual-basic-console.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Visual Studio is an integrated development suite of productivity tools for devel
31
31
### What is a console app?
32
32
A console app takes input and displays output in a command-line window, a.k.a. a console.
33
33
### What is .NET Core?
34
-
.NET Core is the evolutionary next step of the .NET Framework. Where the .NET Framework allowed you to share code across programming languages, .NET Core adds the ability to share code across platforms Even better, it's open source. (Both the .NET Framework and .NET Core include libraries of prebuilt functionality as well as a common language runtime (CLR), which acts as a virtual machine in which to run your code.)
34
+
.NET Core is the evolutionary next step of the .NET Framework. Where the .NET Framework allowed you to share code across programming languages, .NET Core adds the ability to share code across platforms. Even better, it's open source. (Both the .NET Framework and .NET Core include libraries of prebuilt functionality as well as a common language runtime (CLR), which acts as a virtual machine in which to run your code.)
35
35
36
36
## Start developing
37
37
Ready to start developing? Let's go!
@@ -69,7 +69,7 @@ Let's create an app that prompts you for your name and then displays it along wi
69
69
70
70
1. If it is not already open, then open your *WhatIsYourName* project.
71
71
72
-
2. Enter the following Visual Basic code immediately after the opening bracket that follows the `Sub Main(args As String())` line and before the first closing bracket:
72
+
2. Enter the following Visual Basic code immediately after the opening bracket that follows the `Sub Main(args As String())` line and before the `End Sub` line:
0 commit comments