Retargeting Framework

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

Few days ago I described how to target specific version of the framework within Visual Studio 2008. However there is also some feature related to targeting of assemblies, called “retargeting”. Imagine you have built an assembly for desktop and want to deploy it on the embedded device. For example you create embedded project and reference that assembly. During deployment the desktop assembly (and whole framework – referenced assemblies) will be deployed if there is enough space on device. The most important is that the application will not run on the device.

Now, try to do the same thing in opposite direction. Build the assembly on device and reference it in the desktop project. The interesting thing is that the application will probable run. The application will only not run, if some device specific features have been referenced.

How this is possible? So, each “embedded” assembly has an attribute in the metadata (use ILDASM.EXE to find it out) called
retargetable. That means that desktop framework can load corresponding desktop-specific assembly if the original one is build for another platform and marked as retargetable.

Last but not least I was investigating builds of different assemblies and found out that:

1.       All .NET CE assemblies are signed with the key which begins with “9”.

2.       All System.* assemblies of the .NET framework are signed with the key which begins with “b”.

3.       Almost all Microsoft.* assemblies are also signed with “b0”-key.

4.       All WCF assemblies starts with “b7”-key

5.       All Microsoft. Web.* and Microsoft.DirectX.*assemblies are signed with “3”-key.

6.       Microsoft.Office.* starts with “7”-key.

7.       Microsoft.Sql.* starts with “8”-key

8.       Etc.

   

 


Posted Jul 10 2007, 12:16 AM by Damir Dobric
Filed under:
developers.de is a .Net Community Blog powered by daenet GmbH.