godsharp - Hsu.Obfuscar.DotNetTool 2024.103.4

MSBuild for Obfuscar with Obfuscar.GlobalTool.

PM> Install-Package Hsu.Obfuscar.DotNetTool -Version 2024.103.4 -Source https://www.myget.org/F/godsharp/api/v3/index.json

Copy to clipboard

> nuget.exe install Hsu.Obfuscar.DotNetTool -Version 2024.103.4 -Source https://www.myget.org/F/godsharp/api/v3/index.json

Copy to clipboard

> dotnet add package Hsu.Obfuscar.DotNetTool --version 2024.103.4 --source https://www.myget.org/F/godsharp/api/v3/index.json

Copy to clipboard
<PackageReference Include="Hsu.Obfuscar.DotNetTool" Version="2024.103.4" />
Copy to clipboard
source https://www.myget.org/F/godsharp/api/v3/index.json

nuget Hsu.Obfuscar.DotNetTool  ~> 2024.103.4
Copy to clipboard

> choco install Hsu.Obfuscar.DotNetTool --version 2024.103.4 --source https://www.myget.org/F/godsharp/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "godsharp" -SourceLocation "https://www.myget.org/F/godsharp/api/v2"
Install-Module -Name "Hsu.Obfuscar.DotNetTool" -RequiredVersion "2024.103.4" -Repository "godsharp" 
Copy to clipboard

Hsu.Obfuscar.DotNetTool

dev preview main Obfuscar Nuke Build windows linux

Use Obfuscar.GlobalTool to obfuscate .NET code.

Package Version

Name Source Stable Preview
Hsu.Obfuscar.DotNetTool Nuget NuGet NuGet
Hsu.Obfuscar.DotNetTool MyGet MyGet MyGet

Usage

Install Obfuscar.GlobalTool

Global installation:

dotnet tool install --global Obfuscar.GlobalTool --version 2.2.38

Local installation:

dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Obfuscar.GlobalTool --version 2.2.38

Install Hsu.Obfuscar.DotNetTool

See NuGet.

Configuration

  • Add AssemblySearchPath file:

       <PropertyGroup>
           <ObfuscarAssembliesInclude>true</ObfuscarAssembliesInclude>
       </PropertyGroup>
    

    When you build the project, the obfuscar.xml file will be created to the root folder of project and obfuscar.assemblies.xml will be created to the output folder of project.

  • Default obfuscar.xml contents

    <?xml version="1.0"?>
    <Obfuscator>
      <!-- https://docs.obfuscar.com/getting-started/configuration -->
      <!-- https://github.com/obfuscar/obfuscar/blob/master/Obfuscar/Settings.cs -->
    
      <Var name="InPath" value="." />
      <Var name="OutPath" value="obfuscated" />
      <Var name="RenameFields" value="true" />
      <Var name="RenameProperties" value="true" />
      <Var name="RenameEvents" value="true" />
      <Var name="KeepPublicApi" value="true" />
      <Var name="HidePrivateApi" value="true" />
      <Var name="ReuseNames" value="true" />
      <Var name="UseUnicodeNames" value="false" />
      <Var name="UseKoreanNames" value="false" />
      <Var name="HideStrings" value="false" />
      <Var name="OptimizeMethods" value="true" />
      <Var name="SuppressIldasm" value="false" />
    
      <Module file="ConsoleSample.dll">
        <SkipEnums value="true" />
      </Module>
    
      <!-- <Include path="obfuscar.assemblies.xml" /> -->
      <Include path="obfuscar.assemblies.xml" />
    </Obfuscator>
    
  • Default obfuscar.assemblies.xml contents

    <?xml version="1.0"?>
    <Include>
        <AssemblySearchPath path='.' />
    </Include>
    

    You can also modify the obfuscar.xml file to change the default values.

    You can also modify the AssemblySearchNames property will auto gen AssemblySearchPath in obfuscar.assemblies.xml file.

  • AssemblySearchNames

    <PropertyGroup>
        <AssemblySearchNames>Microsoft.CodeAnalysis.dll;Microsoft.CodeAnalysis.CSharp.dll</AssemblySearchNames>
    </PropertyGroup>
    
  • obfuscar.assemblies.xml

    <?xml version="1.0"?>
    <Include>
        <AssemblySearchPath path='C:\Users\Administrator\.nuget\packages\microsoft.codeanalysis.csharp\4.7.0\lib\netstandard2.0' />
        <AssemblySearchPath path='C:\Users\Administrator\.nuget\packages\microsoft.codeanalysis.common\4.7.0\lib\netstandard2.0' />
    </Include>
    

License

MIT

Owners

Seay

Authors

Hsu.Obfuscar.DotNetTool

Project URL

https://github.com/hsu-net/obfuscar

License

Unknown

Tags

Obfuscar MSBuild Hsu

Info

1 total downloads
0 downloads for version 2024.103.4
Download (17.07 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
2024.103.4 17.07 KB Mon, 04 Mar 2024 12:48:00 GMT 0
2024.103.4-rc204633 17.09 KB Mon, 04 Mar 2024 12:46:41 GMT 0
2023.412.21 16.97 KB Thu, 21 Dec 2023 12:27:30 GMT 1
2023.412.21-rc201446 16.98 KB Thu, 21 Dec 2023 12:14:54 GMT 0
2023.412.21-rc003945 16.99 KB Wed, 20 Dec 2023 16:39:52 GMT 0
2023.412.20-rc203929 16.97 KB Wed, 20 Dec 2023 12:39:37 GMT 0
2023.412.16 16.65 KB Fri, 15 Dec 2023 16:12:07 GMT 0
2023.412.16-rc001056 16.66 KB Fri, 15 Dec 2023 16:11:03 GMT 0
2023.412.16-rc000653 16.66 KB Fri, 15 Dec 2023 16:07:01 GMT 0
2023.412.15-rc235859 16.66 KB Fri, 15 Dec 2023 15:59:05 GMT 0
2023.412.15-rc235658 16.66 KB Fri, 15 Dec 2023 15:57:06 GMT 0
2023.412.15-rc235350 16.66 KB Fri, 15 Dec 2023 15:53:57 GMT 0
2023.412.15-rc234551 16.71 KB Fri, 15 Dec 2023 15:46:02 GMT 0
2023.412.14 81.04 KB Fri, 15 Dec 2023 09:32:02 GMT 0