Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to obfuscate my project using Crypto broke it

I was tyring to go through different obfuscating options that I have and in order to do it, I first tried my hands on Crypto.

here are the steps that I followed:

  1. Open Cypto wizard and selected some options.
  2. Select my solution file.

Finished the wizard and what I saw was that there were some of the Dlls well obfuscated BUT my project does not build now. Two things I noticed is that there is this weird .OBPROJ file in my folder and that is responsible for deleting all my old assemblies and then obfuscating them later.

I am seeing following error for 4 of my 18 projects which are failing to build:

System.IO.FileNotFoundException: File 'C:\Dropbox\CPTFramework_old\CommonLib\obj\Debug\CommonLib.dll' not found.

Something very similar for all the 4 projects that are failing. Now, I am not sure what it did to the dll files in OBj/Debug folder but files are absolutely not there.

The other thing that I noticed is that all the projects, when build individually, do build fine. So there is definitely something wrong that has happened to my solution file. But I am not able to find out what exactly has changed.

like image 952
Lost Avatar asked Aug 17 '13 01:08

Lost


2 Answers

Had similar issue. After lot of struggle, found the solution.

In a multi core processor, VS will run the build parallely which makes the Cyrpto obfuscator run before the last project build completion.

Making Maximum number of parallel project builds to 1 in VS 2013 will fix this issue.

TOOLS - Options.. - Build and Run

enter image description here

like image 116
Gopichandar Avatar answered Sep 26 '22 01:09

Gopichandar


I had this same issue recently and so, although outdated, here is the answer for anyone else.

It is related to your build order. I found that the build order in VS did not always correspond to the actual build order. I suggest looking through the output window after a failed build and see which projects are built first and last (you need these to configure Crypto). Obviously, don't forget to ignore any projects that are setup projects or projects not being built in release mode.

All that is required, is to reconfigure crypto with the correct first and last projects, reload your solution and it will build.

like image 31
Lewis Harvey Avatar answered Sep 25 '22 01:09

Lewis Harvey