BT.TagAnalyser 1.2.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package BT.TagAnalyser --version 1.2.0
                    
NuGet\Install-Package BT.TagAnalyser -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BT.TagAnalyser" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BT.TagAnalyser" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="BT.TagAnalyser" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BT.TagAnalyser --version 1.2.0
                    
#r "nuget: BT.TagAnalyser, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BT.TagAnalyser@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BT.TagAnalyser&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=BT.TagAnalyser&version=1.2.0
                    
Install as a Cake Tool

Description

<small>This is a MSBuild extension to provide an interface for build environment(s) to check Tags for each file to validate their values based on DevOps project Tags.
Specifically designed for Relay UK project. </small><br />

Installation

dotnet add package BT.TagAnalyser<br /> <small>or for any specific version</small><br /> dotnet add package BT.TagAnalyser --version 1.0.7<br /> <small>or add as a Nuget package to your project from Nuget Manager</small><br />

Parameters

Files: The list of files to be scanned. <br />

	
	<ItemGroup>
		<AllProjectFiles Include="$(MSBuildProjectDirectory)\**\*.*" />
	</ItemGroup>
	<FileScannerTask Files="@(AllProjectFiles)" TargetExtensions=".cs;.txt;.md" />

or

	
	<FileScannerTask Files="@(Compile)" TargetExtensions=".cs;.txt;.md" />

TargetExtensions: Semicolon-separated list of file extensions to scan (e.g., ".cs;.xaml"). Defaults to ".cs;.xaml" if not provided. <br />

	
	<FileScannerTask Files="@(Compile)" TargetExtensions=".cs;.txt;.md;xaml;.xml;.json;" />

IgnoreNoFileContent: Ignores files with no content. Default is false. <br />

	 
	<FileScannerTask Files="@(Compile)" TargetExtensions=".cs;.txt;.md" IgnoreNoFileContent="true" />

IgnoreNoTagsFound: Ignores files where no tags are found. Default is false. <br />

	 
	<FileScannerTask Files="@(Compile)" TargetExtensions=".cs;.txt;.md" IgnoreNoTagsFound="true" />

LogTagsFound: Logs information about found tags. Default is false. <br />

	 
	<FileScannerTask Files="@(Compile)" TargetExtensions=".cs;.txt;.md" LogTagsFound="true" />

IgnoreInValidTags: Ignores files with invalid tags. Default is false. <br />

	 
	<FileScannerTask Files="@(Compile)" TargetExtensions=".cs;.txt;.md" IgnoreInValidTags="true" />

PreviewDevOpsTags: Prints the DevOps tags obtained from DevOps. Default is false. <br />

	 
	<FileScannerTask Files="@(Compile)" TargetExtensions=".cs;.txt;.md" PreviewDevOpsTags="true" />

<small>If the parameter values are not given, default values will be used</small><br />

Usage

Usage is defined in the .csproj file of your project. You need to register the custom task and create a target that executes before the project builds.
Below is an example of how to set this up in your

As a Nuget Package
Install Nuget using Nuget Manager or dotnet CLI, then modify it's PackageReference to add GeneratePathProperty="true".
This will generate a property that points to the path of the installed package, which can be used in the UsingTask to reference the DLL without hardcoding the path.

<ItemGroup>
	<PackageReference Include="BT.TagAnalyser" Version="1.1.0" GeneratePathProperty="true" />
</ItemGroup>

Then usage is


<UsingTask TaskName="TagAnalyser.FileScannerTask"
		AssemblyFile="$(PkgBT_TagAnalyser)\lib\net10.0\TagAnalyser.dll"
		Runtime="NET"
		TaskFactory="TaskHostFactory" />

As a Direct DLL Reference
TaskFactory sorts out locking problem of the analyser dll but it needs to be told Runtime=NET to run it in modern .net .
Another way of sorting this problem is to killing MSBuild processes because vstudio keeping it alive to re-use them , command is (taskkill /F /IM MSBuild.exe)

<UsingTask TaskName="TagAnalyser.FileScannerTask" 
		AssemblyFile="C:\Users\617563066\Documents\Repos\TagAnalyser\TagAnalyser\bin\Debug\net10.0\TagAnalyser.dll" 
		Runtime="NET" 
		TaskFactory="TaskHostFactory" />

As a Direct DLL Reference with Custom Path

<UsingTask TaskName="TagAnalyser.FileScannerTask"
			   AssemblyFile="$(UserProfile)\.nuget\packages\bt.taganalyser\1.0.8\lib\net10.0\TagAnalyser.dll"
			   Runtime="NET" 
			   TaskFactory="TaskHostFactory" />

All the above ways will work, but the first one is recommended as it is more flexible and does not require hardcoding paths,
making it easier to maintain and share across different environments. Finalised usage example is as below, you can modify the parameters of the FileScannerTask as needed.

<ItemGroup>
	<PackageReference Include="BT.TagAnalyser" Version="1.1.0" GeneratePathProperty="true" />
</ItemGroup>

<UsingTask TaskName="TagAnalyser.FileScannerTask"
		AssemblyFile="$(PkgBT_TagAnalyser)\lib\net10.0\TagAnalyser.dll"
		Runtime="NET"
		TaskFactory="TaskHostFactory" />


<Target Name="ExecuteMyCustomAction" BeforeTargets="BeforeCompile">

	
	<ItemGroup>
		<AllProjectFiles Include="$(MSBuildProjectDirectory)\**\*.*" />
	</ItemGroup>

	
	<FileScannerTask Files="@(AllProjectFiles)" 
		TargetExtensions=".cs;.txt;.md" 
		IgnoreNoFileContent="true" IgnoreNoTagsFound="false" LogTagsFound="false" IgnoreInValidTags="false" PreviewDevOpsTags="true" />

</Target>
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated

This version compatible with .Net 10.0