Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Loader Info   (RSS)
Sorry, but there are no more tags available to filter with.

Channel 9 Interview

Charles Torre and Robert Scoble (behind the camera) dropped by my office to chat with me about the loader for MSDN's Channel 9: part I and part II . Also, check out the PDC video I was in for Channel 9: http://channel9.msdn.com/ShowPost.aspx?PostID=7959
Posted by Suzanne Cook | 19 Comments
Filed under:

New Assembly, Old .NET (and Vice-Versa)

I typically recommend that you build and test your assemblies against the same version of .NET that you will be running them against. That way, you'll have correct references and avoid surprises from behavior differences between builds. Older assembly,
Posted by Suzanne Cook | 16 Comments
Filed under:

Versioning/Deploying Unmanaged Files

An unmanaged dll can be wrapped in a managed assembly by adding it as a file of a multi-module assembly. Then, it can be deployed and versioned in the same way as managed assemblies. (So, that assembly could contain nothing but metadata and unmanaged
Posted by Suzanne Cook | 4 Comments
Filed under:

Load(AssemblyName)

Calling Load(AssemblyName) is not necessarily the same as calling Load(String). If the AssemblyName.CodeBase is not set, then they do do the same thing. So, if you've set the AssemblyName.Name, CultureInfo, public key token / public key and/or Version
Posted by Suzanne Cook | 7 Comments
Filed under:

App.config Examples

Below are three examples of useful application configuration files . Forces the v1.0 CLR to be run. If the v1.0 CLR is not installed, the app will fail to run. <?xml version ="1.0"?> <configuration> <startup> <requiredRuntime version="v1.0.3705"/>
Posted by Suzanne Cook | 25 Comments
Filed under:

Determining Whether a File Is an Assembly

A file is an assembly if and only if it's managed and it contains an Assembly entry in its CLR metadata. Determining by hand A fast way to determine whether a file is an assembly is to run ildasm.exe on it. If it immediately gives an error saying that
Posted by Suzanne Cook | 10 Comments
Filed under:

LoadFile vs. LoadFrom

Be careful - these aren't the same thing. LoadFrom() goes through Fusion and can be redirected to another assembly at a different path but with that same identity if one is already loaded in the LoadFrom context. LoadFile() doesn't bind through Fusion
Posted by Suzanne Cook | 12 Comments
Filed under:

LoadFrom's Second Bind

Pre-v2, when you load an assembly by path through Fusion (LoadFrom(), ExecuteAssembly(), etc.), it can actually cause two binds, not just one. The first bind loads the file at the given path. If that is successful, another bind is done with the display
Posted by Suzanne Cook | 2 Comments
Filed under:

Avoid DevPath

I hesitate to talk about this because I don't want people who don't know about it to think, "Hey, what's this DevPath thing? I need that." But, maybe if I don't explain how to use it, it will be too much effort for people who don't already know how. :)
Posted by Suzanne Cook | 16 Comments
Filed under:

Binding to .NET Frameworks Assemblies

By "Frameworks assemblies," I mean the assemblies that ship with the CLR. But, I'm not counting mscorlib.dll , since it's special in a different way. With v1.0 SP3 or later, Frameworks assemblies are unified. That means that the version of those assemblies
Posted by Suzanne Cook | 3 Comments
Filed under:

Assembly Identity

There are two types of assembly identity that the loader deals with: bind-time and after bind-time. The identity is used to determine whether we will consider a certain assembly to be the same thing as an assembly reference or another assembly. Assembly
Posted by Suzanne Cook | 16 Comments
Filed under:

Unloading an Assembly

There's no way to unload an individual assembly without unloading all of the appdomains containing it. (See here for why not.) This can by done by calling AppDomain.Unload() for each AppDomain that has it loaded. (You could also use UnloadDomain() on
Posted by Suzanne Cook | 29 Comments
Filed under:

Mscorlib.dll

At least for v2 and earlier, mscorlib.dll is a special case. That causes it and its types to be loaded differently from other assemblies. Loading Mscorlib.dll Without a Path It and the execution engine are so closely integrated that it's required that
Posted by Suzanne Cook | 28 Comments
Filed under:

Assembly.CodeBase vs. Assembly.Location

The CodeBase is a URL to the place where the file was found, while the Location is the path from where it was actually loaded. For example, if the assembly was downloaded from the internet, its CodeBase may start with "http://", but its Location may start
Posted by Suzanne Cook | 7 Comments
Filed under:

Determining an Image’s CLR Version

To get it programmatically, from managed code, use Assembly.ImageRuntimeVersion. From unmanaged, use mscoree.dll's GetFileVersion(). (From the command line, starting in v2.0, ildasm.exe will show it if you double-click on "MANIFEST" and look for "Metadata
Posted by Suzanne Cook | 11 Comments
Filed under:
More Posts Next page »
 
Page view tracker