ConfuserEx icon indicating copy to clipboard operation
ConfuserEx copied to clipboard

Not able to generate confused file after implementing Confuser.MSBuild

Open divyeshneo opened this issue 3 years ago • 3 comments

  • ConfuserEx Version: 1.6.0
  • Target Framework:4.6.0
  • Operating System: WIndows 10

Steps to Reproduce:

  1. We have added Confuser.MSBuild 1.6.0 via nuget package in our solution and added configuration settings in .CSProject as per given instruction in following URL :https://github.com/mkaring/ConfuserEx/wiki/MSBuild-Integration
  2. we have build the project and entire solution as well but we are not able to see the confuser .dll with in solution. Kindly help us to figure out the solution or let us know if we missed anything to add or check.

divyeshneo avatar Jul 19 '22 02:07 divyeshneo

Are you getting any output at all? I found this issue when having the same problem, but mine had previously been working. It's not sufficient to add the values to the .csproj file, you also need to create a .crprog file, with the same name as your output file. E.g. for an output file of program.exe you need a program.crproj files as well. In my case, I had renamed my output file, so it was no longer matching the name of the .crproj file, and it was just copying the program to the confused folder, but not actually obfuscating it.

In .csproj I have

  <PropertyGroup>
    <Obfuscate>true</Obfuscate>
  </PropertyGroup>

In .crprog I have:

<project outputDir="$(OutDir)confused\" baseDir="$(MSBuildProjectDirectory)" xmlns="http://confuser.codeplex.com">
  <rule pattern="true" preset="normal" inherit="false" />
</project>

raburton avatar Oct 10 '22 12:10 raburton

Hello, did you resolve this? I was trying the solution provided by @raburton, however, the output files are still not obfuscated. I have copied exactly the content of the .crprog file as you have mentioned. I have no idea what I might be missing.

MichaelSvejcar avatar Sep 15 '23 12:09 MichaelSvejcar

This really needs to get put into the docs: https://github.com/mkaring/ConfuserEx/wiki/MSBuild-Integration

Kravchenko32 avatar Apr 29 '24 20:04 Kravchenko32