diff --git a/README.md b/README.md index f9ab054..2cb5653 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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) diff --git a/Source/Cake.VsMetrics/VsMetricsAliases.cs b/Source/Cake.VsMetrics/VsMetricsAliases.cs index c383628..de12f3a 100644 --- a/Source/Cake.VsMetrics/VsMetricsAliases.cs +++ b/Source/Cake.VsMetrics/VsMetricsAliases.cs @@ -9,13 +9,8 @@ namespace Cake.VsMetrics /// /// Contains functionality related to Visual studio's metrics.exe command line tool. /// - /// 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: - /// - /// Setup(context => { - /// context.Tools.RegisterFile("C:/Program Files (x86)/Microsoft Visual Studio 14.0/Team Tools/Static Analysis Tools/FxCop/metrics.exe"); - /// }); - /// - /// 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: /// /// #addin Cake.VsMetrics ///