Last post Jul 29, 2008 05:57 AM by merlintintintin
Jul 18, 2008 04:18 AM|merlintintintin|LINK
I'm using WebDeployment to deploy (to install) an intranet web application. I compile all aspx.cs class to one DLL. I have 2 more DLL that are personal libray and that are used by my application. So, I have actually 3 DLL. I would like to use NGEN to create
DLL in native code during project installation.
NGEN INSTALL MYDLL1.DLL
NGEN INSTALL MYDLL2.DLL
NGEN INSTALL MYDLL3.DLL
Could you tell me how to use NGEN with WebDeployment Project to register my three DLL ? Have I to add command line in project file (XML) - witch section ?
Second point: I would like also to use Dotfuscator community 3.0 with WebDeployment - if you have an article on the subject it would be great ! I have tried by when method are renamed to aa, bb, cc. the application don't found anymore the methods of my
Jul 22, 2008 11:04 PM|Thomas Sun – MSFT|LINK
You can use Web Deployment project's post-build to run "NGEN" after it is compiled. You can add the following code to Web Deployment project file to execute the command:
<Target Name="AfterBuild" >
<Exec Command="Your command line" ></Exec>
For more information about Dotfuscator community 3.0, see
http://msdn.microsoft.com/en-us/library/ms227240(VS.80).aspx and for how to use it in command line, see Command Line Quick Start (http://msdn.microsoft.com/en-us/library/ms227284(VS.80).aspx).
I look forward to receiving your test results.
Jul 23, 2008 02:44 AM|merlintintintin|LINK
Thanks for information.
This is funny because it is the subject of an other post (of mine).
Strangly, what you suggest is not properly working on my system - it's seem's that AfterBuild event is not fired.. finally i have used AfterMerge (to delete folder) and it is fine .
I have also launch dotfuscator on PreBuild event in property of install project.
2 questions now:
- When dotfuscator compilation is finished - a report appears. Is it a way to do not display this report ?
- I obfuscate but I have a problem with the following line (from my web.config) - this is used to call service.
Parser Error Message: Could not load type 'MyPersonalClass' from assembly 'MyPersonalAssembly'.
How to obfuscate this also ??
Jul 23, 2008 06:33 AM|Thomas Sun – MSFT|LINK
Thanks for your response.
You can use full path such as "D:\FolderName\dotfuscator.exe" to avoid error 9009.
To question 2, you can try to use " -q" switch which tells
Dotfuscator to run completely without printed output. This is suitable for inclusion into application build sequences. This option overrides verbose mode. You can refer to
To protect some elements of web.config, you can try to encrypt it using Aspnet_regiis.exe. For more information, see
I look forward to receiving your test results.
Jul 23, 2008 09:59 AM|merlintintintin|LINK
1. - OK: I use full path and it's workng fine now
2. - FAILED: I have tried option -q (as you suggest) and/or /q but the report at the end still appear. Otherwise, I have no other ouput. When I click on ok to close the report, the package installation continue and finish to build. See my screenshot:
=> "C:\Program Files\Microsoft Visual Studio 8\Application\PreEmptive Solutions\Dotfuscator Community Edition\dotfuscator.exe" -q C:\myproject\dotfuscator_Console.xml
3. - OK: I have check documentation that you provide to crypt web.config but I want to obfuscate and not to crypt (with dotfuscator Community 3.0). The problem is that my class has been transform to myClass -> f all over the code, so in the web.config I
should write f (if I'm using the obfuscated code). So, finally I don't obfuscate the class that is mentioned in my web.config and it's working fine (of course) :) I don't know to replace the (constant) string in the web.config. In fact, after some test, my
application is globally working but I have the same kind of problem with the following instructions:
These both instructions are to avoid if you want to use obfuscation. Does someone has good advice of best practice to be compatible with dotfuscator ?
Thanks for solutions - I still need a good advice for problem 2. :)
Jul 23, 2008 11:35 PM|Thomas Sun – MSFT|LINK
For the problem 2, I believe that the best answer to this question is to contact
I hope this helps.
Jul 29, 2008 05:57 AM|merlintintintin|LINK
I have received the answer to point 2 from pre-emtpive them self and.. it is interresting... :)
Normally we do not provide live support to Community Edition users.
However I will answer your question.
The obfuscation report dialog generated by the Community Edition cannot be disabled.
However in the Professional Edition, there is no obfuscation report dialog.
If you would like try an evaluation of Dotfuscator Professional Edition, you can request an evaluation here:
With that said, I will close the case.