How to install and use obfuscar?

前端 未结 5 481
情深已故
情深已故 2020-12-23 15:28

I just finished my C# project(WPF), but now I meet problems on using \"obfuscar\" (another applicaion would be welcome, if easier to use).

Of course I looked already

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 15:53

    In order to use it on a .Net Core 2.1 console app, you can do this:

    1 - Install Obfuscar by executing the following command in a console window:

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

    (you can check the last version here: https://www.nuget.org/packages/Obfuscar.GlobalTool)

    2 - Add an XML file to the project you want to obfuscate called obfuscar.xml with the following content (from @vinsa answer):

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    3 - Finally, right click on your project, then Properties, Build Events, and in the Post-build event text box add this line:

    if $(ConfigurationName) == Release obfuscar.console .\obfuscar.xml
    

提交回复
热议问题