Check No Binding Redirects Task
Nuget adds binding redirects for updated assemblies to a project under certain conditions.
If you want to make sure that your project doesn't use binding redirects - with the risk of incompatible assemblies - the Appccelerate.CheckNoBindingRedirectsTask checks that no binding redirects are present in the app or web config file.
- checks web or app config files for binding redirects
- integrated in build process
- supports regular expressions for defining exclusions
You can install the CheckNoBindingRedirectsTask using nuget. The package id is
You can overwrite the default behaviour of the CheckHintPathTask by setting properties in the project file.
You can add the property
CheckNoBindingRedirectsTaskExcludePatterns to your project file to define exlusion patterns.
Binding redirects for assemblies matching one of the exclude patterns will not result in a violation.
The list is a comma separated list of regular expressions.
TreatWarningsAsErrors defines whether hint path violations result in warnings or errors.
The default value is
You can overwrite the behaviour by adding the
TreatWarningsAsErrors property to your project file:
<TreatWarningsAsErrors Condition="'$(Configuration)' == 'Release'">true</TreatWarningsAsErrors>
This will result in errors for invalid hint paths during a releae build.