Skip to content

Commit

Permalink
(GH-8) Update documentation to mention ToolVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
fwinkelbauer committed Apr 23, 2017
1 parent 213119a commit 0fc026e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ Cake.VsMetrics is an Addin for [Cake](http://cakebuild.net/) which can calculate

Download and install the [Metrics Powertool](https://www.microsoft.com/en-us/download/details.aspx?id=48213) (this link is for Visual Studio 2015).

Include the Addin in your cake build script and register `metrics.exe` depending on which version of the tool you have installed. This could look like this for Visual Studio 2015:
Include the Addin in your cake build script:

```csharp
#addin "Cake.VsMetrics"

Setup(context => {
context.Tools.RegisterFile("C:/Program Files (x86)/Microsoft Visual Studio 14.0/Team Tools/Static Analysis Tools/FxCop/metrics.exe");
});
```

Afterwards you can start to use the Addin like this:
Expand All @@ -36,6 +32,15 @@ var settings = new VsMetricsSettings()
VsMetrics(projects, "metrics_result.xml", settings);
```

The settings object can also be used to specify the `metrics.exe` version:

```csharp
var settings = new VsMetricsSettings()
{
ToolVersion = VsMetricsToolVersion.VS2015
};
```

## License

[MIT](http://opensource.org/licenses/MIT)
9 changes: 2 additions & 7 deletions Source/Cake.VsMetrics/VsMetricsAliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ namespace Cake.VsMetrics
/// <summary>
/// <para>Contains functionality related to Visual studio's metrics.exe command line tool.</para>
/// <para>
/// In order to use the commands for this addin, you will need to register metrics.exe in your cake build file after you have installed the metrics power tool:
/// <code>
/// Setup(context => {
/// context.Tools.RegisterFile("C:/Program Files (x86)/Microsoft Visual Studio 14.0/Team Tools/Static Analysis Tools/FxCop/metrics.exe");
/// });
/// </code>
/// In addition, you will need to include the following:
/// In order to use the commands for this addin, you will need to install the metrics power tool (which is currently not included in a Visual Studio installation).
/// Afterwards include the Addin in your cake build script and you are ready to go:
/// <code>
/// #addin Cake.VsMetrics
/// </code>
Expand Down

0 comments on commit 0fc026e

Please sign in to comment.