Skip to content

Commit

Permalink
Merge pull request MicrosoftDocs#4624 from MicrosoftDocs/master637142…
Browse files Browse the repository at this point in the history
…770950744202

For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
  • Loading branch information
ghogen authored Jan 10, 2020
2 parents 63f5d6c + 15d29b7 commit f42082e
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 4 deletions.
9 changes: 9 additions & 0 deletions docs/code-quality/code-metrics-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,19 @@ The following list shows the code metrics results that Visual Studio calculates:

- **Class Coupling** - Measures the coupling to unique classes through parameters, local variables, return types, method calls, generic or template instantiations, base classes, interface implementations, fields defined on external types, and attribute decoration. Good software design dictates that types and methods should have high cohesion and low coupling. High coupling indicates a design that is difficult to reuse and maintain because of its many interdependencies on other types. For more information, see the [Class coupling](https://blogs.msdn.microsoft.com/zainnab/2011/05/25/code-metrics-class-coupling/) blog post.

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

- **Lines of Source code** - Indicates the exact number of source code lines that are present in your source file, including blank lines. This metric is available starting in Visual Studio 2019 version 16.4 and Microsoft.CodeAnalysis.Metics (2.9.5).

- **Lines of Executable code** - Indicates the approximate number of executable code lines or operations. This is a count of number of operations in executable code. This metric is available starting in Visual Studio 2019 version 16.4 and Microsoft.CodeAnalysis.Metics (2.9.5). The value is typically a close match to the previous metric, **Lines of Code**, which is the MSIL-instruction-based metric used in legacy mode.
::: moniker-end
::: moniker range="vs-2017"

- **Lines of Code** - Indicates the approximate number of lines in the code. The count is based on the IL code and is therefore not the exact number of lines in the source code file. A high count might indicate that a type or method is trying to do too much work and should be split up. It might also indicate that the type or method might be hard to maintain.

> [!NOTE]
> The [command-line version](../code-quality/how-to-generate-code-metrics-data.md#command-line-code-metrics) of the code metrics tool counts actual lines of code because it analyzes the source code instead of IL.
::: moniker-end

## Anonymous methods

Expand Down
69 changes: 69 additions & 0 deletions docs/code-quality/how-to-generate-code-metrics-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,63 @@ Build succeeded.

The generated XML output takes the following format:

::: moniker range=">=vs-2019"
```xml
<?xml version="1.0" encoding="utf-8"?>
<CodeMetricsReport Version="1.0">
<Targets>
<Target Name="ConsoleApp20.csproj">
<Assembly Name="ConsoleApp20, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<Metrics>
<Metric Name="MaintainabilityIndex" Value="100" />
<Metric Name="CyclomaticComplexity" Value="1" />
<Metric Name="ClassCoupling" Value="1" />
<Metric Name="DepthOfInheritance" Value="1" />
<Metric Name="SourceLines" Value="11" />
<Metric Name="ExecutableLines" Value="1" />
</Metrics>
<Namespaces>
<Namespace Name="ConsoleApp20">
<Metrics>
<Metric Name="MaintainabilityIndex" Value="100" />
<Metric Name="CyclomaticComplexity" Value="1" />
<Metric Name="ClassCoupling" Value="1" />
<Metric Name="DepthOfInheritance" Value="1" />
<Metric Name="SourceLines" Value="11" />
<Metric Name="ExecutableLines" Value="1" />
</Metrics>
<Types>
<NamedType Name="Program">
<Metrics>
<Metric Name="MaintainabilityIndex" Value="100" />
<Metric Name="CyclomaticComplexity" Value="1" />
<Metric Name="ClassCoupling" Value="1" />
<Metric Name="DepthOfInheritance" Value="1" />
<Metric Name="SourceLines" Value="7" />
<Metric Name="ExecutableLines" Value="1" />
</Metrics>
<Members>
<Method Name="void Program.Main(string[] args)" File="C:\source\repos\ConsoleApp20\ConsoleApp20\Program.cs" Line="7">
<Metrics>
<Metric Name="MaintainabilityIndex" Value="100" />
<Metric Name="CyclomaticComplexity" Value="1" />
<Metric Name="ClassCoupling" Value="1" />
<Metric Name="SourceLines" Value="4" />
<Metric Name="ExecutableLines" Value="1" />
</Metrics>
</Method>
</Members>
</NamedType>
</Types>
</Namespace>
</Namespaces>
</Assembly>
</Target>
</Targets>
</CodeMetricsReport>
```
::: moniker-end
::: moniker range="vs-2017"
```xml
<?xml version="1.0" encoding="utf-8"?>
<CodeMetricsReport Version="1.0">
Expand Down Expand Up @@ -206,6 +263,7 @@ The generated XML output takes the following format:
</Targets>
</CodeMetricsReport>
```
::: moniker-end

### Metrics.exe

Expand Down Expand Up @@ -247,13 +305,24 @@ For more information, see [Enable generating code metrics in legacy mode](https:

### Previous versions

::: moniker range=">=vs-2019"
Visual Studio 2015 included a command-line code metrics tool that was also called *Metrics.exe*. This previous version of the tool did a binary analysis, that is, an assembly-based analysis. The newer version of the *Metrics.exe* tool analyzes source code instead. Because the newer *Metrics.exe* tool is source code-based, command-line code metrics results may be different to those generated by the Visual Studio IDE and by previous versions of *Metrics.exe*. Starting in Visual Studio 2019, the Visual Studio IDE analyzes source code like the command-line tool and the results should be the same.

::: moniker-end
::: moniker range="vs-2017"
Visual Studio 2015 included a command-line code metrics tool that was also called *Metrics.exe*. This previous version of the tool did a binary analysis, that is, an assembly-based analysis. The new *Metrics.exe* tool analyzes source code instead. Because the new *Metrics.exe* tool is source code-based, command-line code metrics results are different to those generated by the Visual Studio IDE and by previous versions of *Metrics.exe*.
::: moniker-end

The new command-line code metrics tool computes metrics even in the presence of source code errors, as long as the solution and project can be loaded.

#### Metric value differences

::: moniker range=">=vs-2019"
Starting in Visual Studio 2019 version 16.4 and Microsoft.CodeAnalysis.Metics (2.9.5), `SourceLines` and `ExecutableLines` replace the previous `LinesOfCode` metric. For descriptions of the new metrics, see [Code metrics values](../code-quality/code-metrics-values.md). The `LinesOfCode` metric is available in legacy mode.
::: moniker-end
::: moniker range="vs-2017"
The `LinesOfCode` metric is more accurate and reliable in the new command-line code metrics tool. It's independent of any codegen differences and doesn’t change when the toolset or runtime changes. The new tool counts actual lines of code, including blank lines and comments.
::: moniker-end

Other metrics such as `CyclomaticComplexity` and `MaintainabilityIndex` use the same formulas as previous versions of *Metrics.exe*, but the new tool counts the number of `IOperations` (logical source instructions) instead of intermediate language (IL) instructions. The numbers will be slightly different to those generated by the Visual Studio IDE and by previous versions of *Metrics.exe*.

Expand Down
6 changes: 5 additions & 1 deletion docs/xaml-tools/xaml-overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: XAML overview
ms.date: 07/31/2019
ms.date: 01/09/2020
ms.topic: reference
author: TerryGLee
ms.author: tglee
Expand Down Expand Up @@ -28,6 +28,10 @@ Visual Studio and Blend for Visual Studio provide a XAML Designer that helps you

The articles in this documentation set discuss the XAML Designer in Visual Studio and Blend for Visual Studio.

## What's new

For the latest information, see the [What’s new in XAML developer tools in Visual Studio 2019](https://devblogs.microsoft.com/visualstudio/whats-new-in-xaml-developer-tools-in-visual-studio-2019-for-wpf-uwp/) blog post, or watch our newest video, [New XAML features in Visual Studio](https://youtu.be/yI9OyA4ZM2E), on YouTube.

## See also

- [XAML in WPF apps](/dotnet/framework/wpf/advanced/xaml-in-wpf)
Expand Down
Binary file modified subscriptions/_img/vs-whitesource/vs-whitesource-tile.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 24 additions & 3 deletions subscriptions/vs-whitesource.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: WhiteSource Bolt Benefit | Microsoft Docs
author: evanwindom
ms.author: lank
manager: lank
ms.date: 11/18/2019
ms.date: 01/06/2020
ms.topic: conceptual
description: Learn how to activate the WhiteSource Bolt subscription included with your Visual Studio subscription.
---
Expand Down Expand Up @@ -32,7 +32,22 @@ Find and fix open source vulnerabilities and generate comprehensive inventory an
9. For more information, visit the WhiteSource Bolt [FAQ page](https://bolt.whitesourcesoftware.com/azure/faq/).

## Eligibility
[WhiteSource Bolt](https://marketplace.visualstudio.com/search?term=whitesource&target=AzureDevOps&category=All%20categories&sortBy=Relevance) is now available free in the [Visual Studio Marketplace.

| Subscription Level | Channels | Benefit | Renewable? |
|--------------------------------------------------------------------|---------------------------------------------------------|------------------------------------------------------------------|---------------|
| Visual Studio Enterprise (Standard) | VL, Azure, Retail, selected NFR<sup>1</sup> | 6 months | Yes |
| Visual Studio Enterprise with GitHub Enterprise | VL | 6 months | Yes |
| Visual Studio Professional (Standard) | VL, Azure, Retail | Not available |NA |
| Visual Studio Professional with GitHub Enterprise | VL | Not available |NA |
| Visual Studio Test Professional (Standard) | VL, Retail | Not available |NA |
| MSDN Platforms (Standard) | VL, Retail | Not available |NA |
| Visual Studio Enterprise, Visual Studio Professional (monthly cloud) | Azure | Not available |NA|
||

<sup>1</sup> *Includes: Microsoft Partner Network (Enterprise). Excludes: Not for Resale (NFR), Visual Studio Industry Partner (VSIP), FTE, MCT Software & Services Developer, BizSpark, Imagine, Most Valuable Professional (MVP), Regional Director (RD). MCT Software & Services.*

> [!NOTE]
> Microsoft no longer offers Visual Studio Professional Annual subscriptions and Visual Studio Enterprise Annual subscriptions in Cloud Subscriptions. There will be no change to existing customers experience and ability to renew, increase, decrease, or cancel their subscriptions. New customers are encouraged to go to [https://visualstudio.microsoft.com/vs/pricing/](https://visualstudio.microsoft.com/vs/pricing/) to explore different options to purchase Visual Studio.
## Support resources
- Need help with WhiteSource Bolt? Chat with a WhiteSource Bolt representative live at https://www.whitesourcesoftware.com/vse_whitesource_bolt/
Expand All @@ -43,4 +58,10 @@ Find and fix open source vulnerabilities and generate comprehensive inventory an
Be sure to activate these great benefits to make the most of your Visual Studio subscription:
- [Visual Studio](vs-ide-benefit.md)
- [Azure DevOps](vs-azure-devops.md)
- [Azure DevTest individual credit](vs-azure.md)
- [Azure DevTest individual credit](vs-azure.md)

## See also
- [Visual Studio documentation](/visualstudio/)
- [Azure DevOps documentation](/azure/devops/)
- [Azure documentation](/azure/)
- [Microsoft 365 documentation](/microsoft-365/)

0 comments on commit f42082e

Please sign in to comment.