Skip to content

Dealogic/reference-conflicts-analyzer-azure-devops-task

Repository files navigation

reference conflicts analyzer build task

A build task for Azure DevOps pipelines made with ♥ by

dealogic logo

to analyze reference conflicts in your .NET applications.

build status

Special Thanks to

Mykola Tarasyuk for creating the Reference Conflicts Analyzer command line tool.

Chris Lovett for creating the DgmlImage command line tool.

Content

Installation

Installation can be done using Azure DevOps MarketPlace.

Source Code

Source code can be found on GitHub.

What The Build Step Does

This build step is using Mykola Tarasyuk's reference conflicts analyzer command line tool to produce a dgml file that represents the dependency graph of a .NET application.

With using the DgmlImage command line tool by Chris Lovett to create an image that can be attached as a build summary section on to the build result page.

On the other hand the generated dgml file(s) are attached next to the logs and downloadable from the build summary section too.

Usage

The build task would like to use the Azure DevOps API, therefore scripts to access the OAuth token must be enabled. It can be done on the additional options section of the agent job.

OAuth token must be enabled

Add the following step into your yaml build definition:

- task: Dealogic.reference-conflicts-analyzer-azure-devops-task.reference-conflicts-analyzer.reference-conflicts-analyzer@1
  displayName: "Reference Conflicts Analyzer"
  inputs:
    pathOfFileToAnalyze: '{The entry point of the .NET application to analyze.}'

See the Summary of Task Settings for more options.

Reference conflicts are reported as issues (warnings/errors): Reported Issues

Dependency graph is published as a diagram onto the build summary page: Dependency Graph

Summary of Task Settings

Name Required Default Value Description
pathOfFileToAnalyze true The entry point of the .NET application to analyze.
pathOfConfigFile false The location of the configuration file that can contain assembly binding redirections.
ignoreSystemAssemblies true true Ignore the system assemblies from the analysis. By default those won't be included.
diagramAttachmentEnabled true true The dependency graph as a diagram will be shown on the build summary page.
diagramZoomLevel true 1 The zoom level of the attached diagram. By default it's 1. It has to be a floating number.
treatVersionConflictsAs true warnings How the version conflicts are reported. By default reported as warnings.
treatResolvedVersionConflictsAs true warnings How the resolved version conflicts (resolved with binding redirection in configuration file) are reported. By default reported as warnings.
treatOtherConflictsAs true warnings How the other conflicts are reported. By default reported as warnings.
treatUnusedAssembliesAs true warnings How the unused assemblies are reported. By default reported as warnings.
treatMissedAssembliesAs true warnings How the assembly is missed are reported. By default reported as warnings.
workingFolder false Working folder where the reference conflicts analysis will run. If you leave it blank it is the root of the repository.
referenceConflictsAnalyzerCliDownloadUrl true Link to download CLI The URL of the Reference Conflicts Analyzer command line tool.

Release Notes

  • 1.3.0 (19/06/2019)
    • New build/deployment badge on README page. (as build and deployment are on travis-ci.org)
  • 1.2.4 (17/01/2019)
    • Link to download the dgml file on the build summary page.
  • 1.1.0 (16/01/2019)
    • Option to enable/disable diagram image attachment. If diagram image attachment is enabled, OAuth token has to be enabled to the build step.
    • Option to change the zoom level of the diagram image attachment.
  • 1.0.1 (14/01/2019)
    • Using custom nuget.config to download DgmlImage library from nuget.org.
    • Links are fixed in documentation.
    • Task input labels are fixed.
  • 1.0.0 (07/01/2019)
    • First stable version.
    • Analyze reference conflicts in .NET application.
    • Shows dependency graph on the build summary page.

License

MIT