ConfuserEx icon indicating copy to clipboard operation
ConfuserEx copied to clipboard

Confuser task does not work

Open KvanTTT opened this issue 5 years ago • 7 comments

I'm trying to perform the following steps:

  1. Create project ObfuscationTest.csproj here: https://github.com/KvanTTT/ObfuscationTest
  2. Add Confuser.MSBuild dependecy from https://www.nuget.org/packages/Confuser.MSBuild/2.0.0-alpha-0191
  3. Add ObfuscationTest.crproj file with the following content:
<project baseDir="bin\Debug\netcoreapp2.1" outputDir="..\..\Obfuscated" >
    <rule pattern="true" inherit="false">
        <protection id="anti ildasm" />
        <protection id="constants" />
        <protection id="invalid metadata" />
        <protection id="rename">
            <argument name="mode" value="decodable" />
        </protection>
    </rule>
    <module path="ObfuscationTest.exe" />
</project>
Add Obfuscation attribute to .csproj file:
<PropertyGroup>
    <Obfuscate>True</Obfuscate>
</PropertyGroup>

After that, I'm trying to compile project (Rider) but it's failing with the following error.

0>------- Project finished: ObfuscationTest. Succeeded: False. Errors: 0. Warnings: 0

Obfuscated assembly is also not being created.

If I run msbuild via command line, the following error occurs:

ConfuseAssembly:
  [CRITICAL] An IO error occurred, check if all input/output locations are readable/writable.

But all paths are valid and such .crproj works fine with Confuser command line tool.

KvanTTT avatar Jun 18 '19 06:06 KvanTTT