Not able to generate confused file after implementing Confuser.MSBuild
- ConfuserEx Version: 1.6.0
- Target Framework:4.6.0
- Operating System: WIndows 10
Steps to Reproduce:
- 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
- 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.
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>
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.
This really needs to get put into the docs: https://github.com/mkaring/ConfuserEx/wiki/MSBuild-Integration