简体   繁体   English

ConfuserEx 使用 Visual Studio 安装程序安装项目,混淆无法正常工作?

[英]ConfuserEx With Visual Studio Installer Setup Project, Obfuscation not working properly?

I have created single layer windows form application and added one Visual Studio Install Setup Project to create the installation wizard using Visual Studio 2013.我创建了单层 Windows 窗体应用程序并添加了一个 Visual Studio 安装安装项目来使用 Visual Studio 2013 创建安装向导。

So my application contains one .exe file and number of .dll files (SQLite, EntitiyFramework, etc) and other publish items.所以我的应用程序包含一个 .exe 文件和一些 .dll 文件(SQLite、EntitiyFramework 等)和其他发布项目。 I am trying to Obfuscate my code using ConfuserEx.我正在尝试使用 ConfuserEx 混淆我的代码。

  1. For that, first I have created the publish build using my Visual Studio 2013.为此,我首先使用 Visual Studio 2013 创建了发布版本。
  2. Using ConfuserEx , obfuscated my publish .exe file.使用ConfuserEx混淆了我的发布 .exe 文件。 This step was working fine.这一步工作正常。 I tried to decompile the obfuscated .exe file and got the unreadable code files.我试图反编译混淆的 .exe 文件并得到不可读的代码文件。 So that means, the process works fine.所以这意味着,这个过程工作正常。
  3. Then I have replaced the obfuscated exe file with release exe file (..\\bin\\Release\\appName.exe).然后我用发布 exe 文件 (..\\bin\\Release\\appName.exe) 替换了混淆的 exe 文件。
  4. Then, rebuilt the installer setup project to generate the setup.exe file.然后,重建安装程序安装项目以生成 setup.exe 文件。
  5. Then I have installed the software using setup.exe.然后我使用 setup.exe 安装了该软件。 Installation was success.安装成功。
  6. Decompiled the installed application exe using .NET Reflector 9使用 .NET Reflector 9 反编译安装的应用程序 exe
  7. Decompiler shows the exact source of my project.反编译器显示了我的项目的确切来源。 So that means something is wrong in the obfuscation process.所以这意味着混淆过程中出现了问题。

Anyone know how to fix this issue?有谁知道如何解决这个问题?

I find the issue.我找到了问题。

I was replacing the ..bin\\Release\\AppName.exe file instead of ..obj\\Release\\Appname.exe我正在替换 ..bin\\Release\\AppName.exe 文件而不是 ..obj\\Release\\Appname.exe

Now it is working fine.现在它工作正常。

Thanks.谢谢。

I have tried your way, it worked for one time only.我试过你的方法,它只工作了一次。 I found better and easier way to solve this issue as such:我找到了更好、更简单的方法来解决这个问题:

  1. In the VS installer choose the primary output folder, right click.在 VS 安装程序中选择主输出文件夹,右键单击。
  2. Choose exclude filter.选择排除过滤器。 form exclude filter window, Choose add filter.表单排除过滤器窗口,选择添加过滤器。
  3. Write down your program.exe.写下你的程序.exe。
  4. Now select your VS installer project, right click.现在选择您的 VS 安装程序项目,右键单击。
  5. Choose add File.. Browse toward your confused exe.选择添加文件.. 浏览您困惑的 exe。
  6. After building this, the confused exe will be installed.构建完成后,将安装混淆的 exe。

It work well with me它对我很有效

I have tried your way, it worked for one time only.我试过你的方法,它只工作了一次。 I found better and easier way to solve this issue as such:我找到了更好、更简单的方法来解决这个问题:

  1. In the VS installer choose the primary output folder, right click.在 VS 安装程序中选择主输出文件夹,右键单击。
  2. Choose exclude filter.选择排除过滤器。
  3. form exclude filter window, Choose add filter.表单排除过滤器窗口,选择添加过滤器。
  4. Write down your program.exe.写下你的程序.exe。
  5. Now select your VS installer project, right click.现在选择您的 VS 安装程序项目,右键单击。
  6. Choose add File..选择添加文件..
  7. Browse toward your confused exe.浏览您困惑的 exe。

After building this, the confused exe will be installed.构建完成后,将安装混淆的 exe。

Tried and tested all above ways, Failed -> Now look at this way: (A Smaller one)尝试并测试了上述所有方法,失败 -> 现在看这种方式:(较小的)

  1. In the VS installer choose the primary output folder, double click.在 VS 安装程序中选择主输出文件夹,双击
  2. Choose your program.exe and remove it.选择您的 program.exe 并将其删除。 (YES remove it) (是的删除它)
  3. Now select your VS installer project, right click.现在选择您的 VS 安装程序项目,右键单击。
  4. Choose add File..选择添加文件..
  5. Browse toward your confused/obfuscated exe .浏览您的混淆/混淆的exe -> Select it. -> 选择它。

After building this, the confused/obfuscated exe will be installed.构建完成后,将安装混淆/混淆的 exe。

the issue in above similar solutions is: When you exclude the exe it will not include the executable file at all.上述类似解决方案中的问题是:当您排除 exe 时,它根本不会包含可执行文件。

So you simply need to remove the exe generated from the project output and replace it with your obfuscated exe.因此,您只需删除从项目输出生成的 exe 并将其替换为您的混淆 exe。

Thanks.谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 安装项目 - 生成的安装程序有问题 - Visual studio setup project - problem with the generated installer Windows Installer Visual Studio安装项目 - Windows Installer Visual Studio Setup Project 将 SQLLocalDB 包含到 Visual Studio 安装程序安装项目中 - Include SQLLocalDB into Visual Studio Installer Setup Project Visual Studio 安装项目:在没有管理员权限的情况下运行 msi 安装程序 - Visual Studio Setup Project: Run the msi installer without administrator rights C#Visual Studio安装程序设置项目输出为一个.exe - c# visual studio installer setup project output as one .exe Visual Studio安装程序安装项目从自定义操作执行回滚 - Visual studio installer setup project perform rollback from custom action Visual Studio安装项目 - Visual Studio Setup Project Visual Studio安装程序项目中的其他安装程序 - Additional Setup in Visual Studio Installer Projects 在安装和部署类别中缺少Visual Studio安装程序 - Missing Visual Studio Installer in Setup & Deployment category 什么是Visual Studio 2010安装项目中的“运行时实现来自ASSEMBLE NAME”? (vs 2015中的安装程序扩展设置项目) - what is “Runtime Implementation from ASSEMBLE NAME” in visual studio 2010 Setup Project? (Installer Extension Setup Project in vs 2015)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM