Obfuscation.Tasks 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Obfuscation.Tasks --version 1.0.1                
NuGet\Install-Package Obfuscation.Tasks -Version 1.0.1                
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="Obfuscation.Tasks" Version="1.0.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Obfuscation.Tasks --version 1.0.1                
#r "nuget: Obfuscation.Tasks, 1.0.1"                
#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.
// Install Obfuscation.Tasks as a Cake Addin
#addin nuget:?package=Obfuscation.Tasks&version=1.0.1

// Install Obfuscation.Tasks as a Cake Tool
#tool nuget:?package=Obfuscation.Tasks&version=1.0.1                

Obfuscation.Tasks Obfuscation.Tasks

.NET Build NuGet Publish CodeQL

Summary

This is an MSBuild custom task that can be triggered at any event after compilation to automatically obfuscate assembly files.

Usage

Install package

.NET CLI:

dotnet add package Obfuscation.Tasks --version 1.0.0

or PowerShell:

Install-Package Obfuscation.Tasks -Version 1.0.0

or Edit project items:

<ItemGroup>
  <PackageReference Include="Obfuscation.Tasks" Version="1.0.0">
    <PrivateAssets>all</PrivateAssets>
    <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
  </PackageReference>
</ItemGroup>

Configure ObfuscationTask

Triggered after PostBuildEvent:

<Target Name="Obfuscation" AfterTargets="PostBuildEvent">
  <ObfuscationTask ToolDir="\\192.168.1.155\dll" InputFilePath="$(TargetPath)" DependencyFiles="" OutputFilePath="" TimeoutMillisecond="2000" Importance="high">
    <Output TaskParameter="ObfuscationedFilePath" PropertyName="SecuredFilePath" />
  </ObfuscationTask>
  <Message Text="SecuredFilePath: $(SecuredFilePath)" Importance="high" />
</Target>

Or trigger after publication. Here's a detail, when the OutputType is Library, it needs to depend on the GenerateNuspec target. When the OutputType is Exe, it needs to depend on the Publish target.

<Target Name="Obfuscation" AfterTargets="GenerateNuspec">
  <ObfuscationTask ToolDir="\\192.168.1.155\dll" InputFilePath="$(TargetPath)" Importance="low">
    <Output TaskParameter="ObfuscationedFilePath" PropertyName="SecuredFilePath" />
  </ObfuscationTask>
  <Message Text="SecuredFilePath: $(SecuredFilePath)" Importance="high" />
</Target>
  • Input Parameters:

    • ToolDir: Required. Example: \\192.168.1.155\dll
    • InputFilePath: Required. Example: D:\sources\ObfuscationSamples\ObfuscationSamples\bin\Release\ObfuscationSamples.dll
    • DependencyFiles: Optional. Example: $(OutputPath)Serilog.dll;$(OutputPath)Serilog.Sinks.Console.dll
    • OutputFilePath: Optional. Default value: $(InputFilePath)_Secure.dll. Example: D:\sources\ObfuscationSamples\ObfuscationSamples\bin\Release\ObfuscationSamples_Secure.dll
    • TimeoutMillisecond: Optional. Default value: 30000
    • Importance: Optional. Default value: Normal. Options: High, Normal, Low. Reference Message task.
  • Output Parameters:

    • ObfuscationedFilePath: string. Default value: OutputFilePath

Support

Support MSBuild v15.0 or higher.

Samples

Authors

License

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETFramework 4.7.2

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

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
1.0.2 778 2/28/2022
1.0.1 442 2/26/2022
1.0.0 464 2/24/2022