Saturday, March 23, 2013

"A script on this page is causing Internet Explorer to run slowly" error solution

This is because some scripts may take an excessive amount of time to run, Internet Explorer prompts the user to decide whether they would like to continue running the slow script.

There are situations when a Web page contains script that takes an unusually long time to run. If you are scripting an ActiveX control on a Web page to transfer a very large file or do a large database query, this will often cause a significantly long delay.

This error could be fixed with a Microsoft Patch Update. Check out this Microsoft page for solution..
http://support.microsoft.com/kb/175500

Saturday, March 16, 2013

How to use ILMerge?

"A Zero Installation Technique for Portable Applications"

Build Portable in .NET C# App using ILMerge


I had a situation where I need to develop a portable application with simple installation. Finally I found a way make it zero installation!

If you are developing a portable Windows based application on .NET platform, you could benefit from IL Merging technique for your deployment.

IL Merge is a technique and a research product from Microsoft, to merge multiple DLLs and EXEs (.NET Assemblies) together to form a merged file (exe or dll). This way no separate DLL file is required.
Follow the below steps for merging an exe and dll associated with the project.

Download and install the ILMerge utility from Microsoft Website.

Step 1: Download ILMerge utility and install it in your machine
http://www.microsoft.com/en-us/download/details.aspx?id=17630

Step 2: Compile and Publish your Project to a folder (eg: C:\Publish\)

Step 3: Use the ilmerge command to merge the exe and dll files and output single exe file

ILMerge Command
Syntax (Simple*): ilmerge <input assembly 1> <input assembly 2> /out:<output file> /target:<dll|exe|winexe>

*For complete set of options and syntax refer ILMerge Documentation

Example:

C:\Program Files\Microsoft\ILMerge>ilmerge C:\Publish\MyProgram.exe C:\Publish\MyLibrary.dll /out:C:\Publish\MyWinApp.exe /target:winexe /ndebug

ilmerge – Command
MyProgram.exe – Output from the published folder
MyLibrary.dll – Any library used in the program
/target:winexe – We need to output a single exe file for Windows Platform
/output – Output folder and filename
/ndebug – To disable debug (.pdb file)

Note: Use the exe file first in the order of input files to get .exe as extension for output file.

Please share your experience and suggestions in the comments section below.