.NET Framework
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));...
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...
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...
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...
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...
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...
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...