This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcheckhintpathtask.html
87 lines (79 loc) · 3.39 KB
/
checkhintpathtask.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
layout: documentation
title: CheckHintPathTask
teaser: Checks hint paths in project files on build
navigation:
- name: MSBuild Tasks
link: msbuildtasks.html
- name: Overview
link: checkhintpathtask.html
---
<h1>Check Hint Path Task</h1>
<a href="https://www.nuget.org/packages/Appccelerate.CheckHintPathTask/">
<img src="http://img.shields.io/nuget/v/Appccelerate.CheckHintPathTask.svg" title="latest version" />
<img src="http://img.shields.io/nuget/dt/Appccelerate.CheckHintPathTask.svg" title="number of downloads" />
</a>
<a href="https://www.myget.org/gallery/appccelerate">
<img src="https://img.shields.io/myget/appccelerate/v/Appccelerate.CheckHintPathTask.svg" title="latest alpha version" />
</a>
<a href="https://github.com/appccelerate/checkhintpathtask/issues">
<img src="https://img.shields.io/github/issues/appccelerate/CheckHintPathTask.svg" title="open issues" />
</a>
<h2>Motivation</h2>
<p>
Visual Studio uses hint paths to locate referenced assemblies.
Unfortunately, Visual Studio or Resharper sometimes make a reference to an assembly at a wrong location. For example to <code>bin\debug</code> instead of <code>packages\MyPackage.1.2.3\net45\</code> (Nuget).
</p>
<p>
The Appccelerate.CheckHintPathTask checks whether all hint paths point to a valid location.
</p>
<h2>Features</h2>
<p>
<ul class="check dotted">
<li>checks hint paths of references in the project file</li>
<li>valid locations can be configured</li>
<li>integrated in build process</li>
</ul>
</p>
<h2>Installation</h2>
<p>
You can install the CheckHintPathTask using nuget. The package id is <code>Appccelerate.CheckHintPathTask</code>.
</p>
<h2>Configuration</h2>
<p>
You can overwrite the default behaviour of the CheckHintPathTask by setting properties in the project file.
</p>
<h3>Excluded Reference Prefixes</h3>
<p>
All references with a prefix defined by the property <code>ExcludedReferencePrefixes</code> are excluded.
This is used to exclude all assemblies found in the GAC (global assembly cache). They don't have a hint path.
</p>
<p>
The default values are <code>System,Microsoft,Windows,Presentation</code>.
</p>
<p>
You can overwrite the default values by adding the <code>ExcludedReferencePrefixes</code> property to your project file:
E.g. <code><ExcludedReferencePrefixes>System,Microsoft,Windows,Presentation,MyPrefix,MyOtherPrefix</ExcludedReferencePrefixes>
</code>
</p>
<h3>Known Hint Path Prefixes</h3>
<p>
The property <code><KnownHintPathPrefixes></code> defines all valid prefixes for hint paths.
</p>
<p>
The default value is <code>..\packages</code> (the folder for nuget packages).
</p>
<p>
You can overwrite the known hint path prefixes by adding the <code>KnownHintPathPrefixes</code> property to your project file:
E.g. <code><KnownHintPathPrefixes>..\packages,..\ThirdPartyAssemblies</KnownHintPathPrefixes></code>.
<h3>TreatWarningsAsErrors</h3>
<p>
The property <code>TreatWarningsAsErrors</code> defines whether hint path violations result in warnings or errors.
</p>
<p>
The default value is <code>false</code>.
<p>
<p>
You can overwrite the behaviour by adding the <code>TreatWarningsAsErrors</code> property to your project file:
E.g. <code><TreatWarningsAsErrors Condition="'$(Configuration)' == 'Release'">true</TreatWarningsAsErrors></code>
This will result in errors for invalid hint paths during a releae build.