Adding the ‘other’ WP7 Libraries to your VS 2010


WARNING: Everything I’m sharing with you is unsupported. You may or may not be able to publish WP7 applications to the Marketplace using these features. The point behind this is to satisfy hackers. This does NOT modify your phone in any way-it just makes it easier to dig into what WP7 already does. If you use these undocumented features, Microsoft may later change these APIs your applications when they choose to document these features or remove them from a future image of your WP7 phone. Microsoft does not promise to keep these APIs alive between WP7 updates. Got it?

I was curious what goodies were on the phone but not available to everyone else. I knew that people had grabbed the OS image and pulled apart the files on it already, so I figured someone had probably hacked that part already. After some searching, I found this: http://thounsell.co.uk/2010/11/avoiding-reflection-adding-the-interopservices-library-to-the-wp7-sdk/. The handy thing here is that Thomas Hounsell also dumped out all the libraries and gave a hint as to how to include these in our own applications. In there, you will find all sorts of goodies. The binaries he provides include EVERYTHING- documented and undocumented. I didn’t see complete details on how to wire up the additional, undocumented bits. Here are my extra instructions:

1. Unpack the binaries from here.

2. Copy the dlls to C:Program Files (x86)Reference AssembliesMicrosoftFrameworkSilverlightv4.0
ProfileWindowsPhone

3. Run the following commands from a VS 2010 command prompt, running as administrator (line breaks are in the right place, so copy and paste from here should work):

move GAC_CustomMarshalers_v3_7_0_0_cneutral_1.dll CustomMarshalers.dll
move GAC_Microsoft.Phone.InteropServices_v7_0_0_0_cneutral_1.dll Microsoft.Phone.InteropServices.dll
move GAC_Microsoft.Phone.Media.Extended_v7_0_0_0_cneutral_1.dll Microsoft.Phone.Media.Extended.dll
move GAC_Microsoft.ServiceModel.Channels.Mail.WindowsMobile_v3_7_0_0_cneutral_1.dll Microsoft.ServiceModel.Channels.Mail.WindowsMobile.dll
move GAC_Microsoft.ServiceModel.Channels.Mail_v3_7_0_0_cneutral_1.dll Microsoft.ServiceModel.Channels.Mail.dll
move GAC_Microsoft.VisualBasic.SR_v8_1_1_0_cneutral_1.dll Microsoft.VisualBasic.SR.dll
move GAC_Microsoft.VisualBasic_v8_1_1_0_cneutral_1.dll Microsoft.VisualBasic.dll
move GAC_System.Data.DataSetExtensions_v3_7_0_0_cneutral_1.dll System.Data.DataSetExtensions.dll
move GAC_System.Data_v3_7_0_0_cneutral_1.dll System.Data.dll
move GAC_System.Messaging_v3_7_0_0_cneutral_1.dll System.Messaging.dll
move GAC_System.Net.IrDA_v3_7_0_0_cneutral_1.dll System.Net.IrDA.dll
move GAC_System.SR_v3_7_0_0_cneutral_1.dll System.SR.dll
move GAC_System.Web.Services_v3_7_0_0_cneutral_1.dll System.Web.Services.dll
move GAC_System.Windows.debug.resources_v2_0_5_0_cen-US_1.dll System.Windows.debug.resources.dll
move GAC_System.Windows.RuntimeHost_v2_0_5_0_cneutral_1.dll System.Windows.RuntimeHost.dll
sn -Vr CustomMarshalers.dll
sn -Vr Microsoft.Phone.Interop.dll
sn -Vr Microsoft.Phone.InteropServices.dll
sn -Vr Microsoft.Phone.Media.Extended.dll
sn -Vr Microsoft.ServiceModel.Channels.Mail.dll
sn -Vr Microsoft.ServiceModel.Channels.Mail.WindowsMobile.dll
sn -Vr Microsoft.VisualBasic.dll
sn -Vr Microsoft.VisualBasic.SR.dll
sn -Vr System.Data.DataSetExtensions.dll
sn -Vr System.Data.dll
sn -Vr System.Messaging.dll
sn -Vr System.Net.IrDA.dll
sn -Vr System.SR.dll
sn -Vr System.Web.Services.dll
sn -Vr System.Windows.RuntimeHost.dll
del GAC_*.dll

 

4. From that administrative window, use notepad to open up

C:Program Files (x86)Reference AssembliesMicrosoftFrameworkSilverlightv4.0ProfileWindowsPhoneRedistListFrameworkList.xml

5. Within the XML add the following lines before the closing tag in the document (and save the file!):

  <File AssemblyName="Microsoft.Phone.InteropServices" Version="7.0.0.0" Culture="neutral" PublicKeyToken="24eec0d8c86cda1e" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="Microsoft.Phone.Media.Extended" Version="7.0.0.0" Culture="neutral" PublicKeyToken="24eec0d8c86cda1e" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="CustomMarshalers" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="System.Data" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="Microsoft.ServiceModel.Channels.Mail.WindowsMobile" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="Microsoft.ServiceModel.Channels.Mail" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="Microsoft.VisualBasic" Version="8.1.1.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="Microsoft.VisualBasic.SR" Version="8.1.1.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="System.Data.DataSetExtensions" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="System.Data" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="System.Messaging" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="System.Net.IrDA" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="System.SR" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="System.Web.Services" Version="3.7.0.0" Culture="neutral" PublicKeyToken="969db8053d3322ac" ProcessorArchitecture="MSIL" InGac="false" />
   <File AssemblyName="System.Windows.RuntimeHost" Version="2.0.5.0" Culture="neutral" PublicKeyToken="31bf3856ad364e35" ProcessorArchitecture="MSIL" InGac="false" />

And that’s pretty much all you need to do in order to get access to the other DLLs within VS 2010.

%d bloggers like this: