Obfuscation.Tasks 1.0.2

dotnet add package Obfuscation.Tasks --version 1.0.2
NuGet\Install-Package Obfuscation.Tasks -Version 1.0.2
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.2">
  <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.2
#r "nuget: Obfuscation.Tasks, 1.0.2"
#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.2

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

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.2

or PowerShell:

Install-Package Obfuscation.Tasks -Version 1.0.2

or Edit project items:

<ItemGroup>
  <PackageReference Include="Obfuscation.Tasks" Version="1.0.2">
    <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" InputFilePaths="$(TargetPath)" DependencyFiles="" OutputFileNameSuffix="" TimeoutMillisecond="2000" Importance="high">
    <Output TaskParameter="OutputFilePaths" PropertyName="SecuredFilePaths" />
  </ObfuscationTask>
  <Message Text="SecuredFilePaths: $(SecuredFilePaths)" 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" InputFilePaths="$(TargetPath)" Importance="low">
    <Output TaskParameter="OutputFilePaths" PropertyName="SecuredFilePaths" />
  </ObfuscationTask>
  <Message Text="SecuredFilePaths: $(SecuredFilePaths)" Importance="high" />
</Target>
  • Input Parameters:

    • ToolDir: Required. Example: \\192.168.1.155\dll
    • InputFilePaths: Required. Single example: D:\sources\ObfuscationSamples\ObfuscationSamples\bin\Release\ObfuscationSamples.dll; Multiple examples: $(TargetPath);D:\ref\Samples1.dll;D:\ref\Samples2.dll
    • DependencyFiles: Optional. Example: $(OutputPath)Serilog.dll;$(OutputPath)Serilog.Sinks.Console.dll
    • TimeoutMillisecond: Optional. Default value: 30000
    • Importance: Optional. Default value: Normal. Options: High, Normal, Low. Reference Message task
    • OutputFileNameSuffix: Optional. Default value: _Secure
  • Output Parameters:

    • OutputFilePaths: string. Default value: $(InputFilePaths)$(OutputFileNameSuffix).dll. Example: D:\sources\ObfuscationSamples\ObfuscationSamples\bin\Release\ObfuscationSamples_Secure.dll

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 723 2/28/2022
1.0.1 416 2/26/2022
1.0.0 439 2/24/2022