Geeks With Blogs
Rupreet's Weblog Looking deep inside under the hood .NET Framework
WinDBG: How to load specific version of mscordacwks.dll for debugging crash dumps
If anyone of you has debugged managed crash dumps, I am sure you must have come across a situation when debugger keeps telling you it’s not able to load mscordacwks.dll. It usually happens when the dump was taken from a machine that had a specific version on .NET framework with patches installed and the machine where the crash dump is being analyzed has different .NET framework version number. When I talk about different version no, I mean the minor version. E.g. Crash dump was taken from machine ......

Posted On Monday, March 12, 2012 3:58 PM

Avoid Assembly.LoadFrom; instead use Assembly.Load
Setting the context… We have a web application which communicates with WCF based service façade for any business functionality. This service façade then loads assembly (based on configuration) at the runtime for making the system pluggable. By default the implementation is in the service assembly itself. Below is the sample code for loading the assembly and creating an instance of the desired class. Assembly asm = Assembly.LoadFrom(Path.Comb... assemblyName)); ......

Posted On Tuesday, February 16, 2010 12:49 AM

Tip: How to view assembly directory structure
Assembly folder in windows directory is a special folder which shows files in a different manner. To view this folder in a normal view – with all files and directory structure in it, just a tweak in registry needs to be done. Add “DisableCacheViewer&#... DWord key and set its value to 1 at HKEY_LOCAL_MACHINE\SOFTWARE... ......

Posted On Saturday, June 24, 2006 6:35 PM

VS2005 Another Desinger Issue - Winforms not opening
Last week, i got the resolution for one the Designer Issue we were facing and this week we bumped into another. Here is the Designer error message we get when we open up winform. One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Hide at System.Reflection.Module.Ge... ......

Posted On Wednesday, December 21, 2005 9:26 AM

VS2005 Designer Issue - WinForms not opening after migrating
Recently in my project we migrated from VS2003 to VS2005. The application I am working on is a smart client application so it has lot many Win Forms. After migration, when the solution was opened up in VS2005, we faced this strange problem. None of the Forms were opening in the designer mode. It was throwing exception (shown below) One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code ......

Posted On Wednesday, December 14, 2005 6:36 PM

ILDASM locks the file if there is some error while disassembling the assembly
I have been using ILDASM a lot for past few days when I encountered this bug. This problem is with ILDASM shipped with .NET 1.1 SDK. The problem: If you open an assembly built with .NET 2.0 and try to disassemble it, it throws error “error : Failed to open meta data” which is valid because we trying to disassemble an assembly built on 2.0 with ILDASM for 1.1. But on clicking OK button, without closing ILDASM, try to delete or rename the assembly you are trying to disassemble. You cannot ......

Posted On Wednesday, November 9, 2005 10:18 AM

How to determine whether a file is a .NET Assembly or not?
There are some scenarios where need to check programmatically if the given file is a .NET assembly or not. How do we do that? One way is to use reflection and try to load that file (assembly). If the assembly gets loaded, and doesn’t throw any exception, then yes, it’s a valid .NET assembly. If it’s not a valid file, then it’ll throw a “BadImageFormatExcept... The idea of checking weather a file is assembly or not by loading it and checking if exception is thrown ......

Posted On Wednesday, November 2, 2005 11:09 AM

Getting window caption and class name
Recently I was working on a utility very similar spy++, but could do more than what we have in spy++ - like besides getting me the window (not Windows :P) class name and its height/width etc, it could also give me the caption of the window. I read couple of articles and all suggested to use global hooks. Using hooks because we are doing all this stuff using mouse – a very similar UI experience like that of spy++ - you click on the bull’s eye icon and drag the mouse to the destination ......

Posted On Monday, October 17, 2005 8:28 PM

Copyright © Rupreet Singh Gujral | Powered by: