Troubleshooting:Windows Azure with WCF Webrole & Windows Phone Client:Could not load file or assembly ‘MyTodo.Web’/ ‘msshrtmi’ or one of its dependencies. An attempt was made to load a program with an incorrect format.
November 28, 2011 Leave a comment
While working with a project of Windows Azure Toolkit Training Kit 2011 November update named Windows Phone 7 & Cloud, observed some issues while running the application Azure Development fabric. The Azure Project simply loads a WCF service webrole project in Begin , now while compiling in Azure Compute emulator it throws the following exception :
Similar Exception incorporated with ‘msshrtmi’.dll while connecting with dfservice. Possible solutions are :
- Solutions: Check out the Debug platform (Any CPU/X86/X64/Itanium) in Build section of WCF Webrole property.
- Make it out as X64 for 64 bit OS & x86 for 32 bit OS. Windows Azure itself hosts as 64bit OS in VM.
- Unload the Webrole project from Solution & open the edit section of the project. Remove the Entry :
- <PlatformTarget>Any CPU </PlatformTarget>
- Next Reload the project & compile the project. If it again produces same error then try out the following steps:
- Download Dependency Walker from : http://www.dependencywalker.com/ & Choose your appropriate OS compatible version.
- Check out if the msshrtmi.dll is present inside bin/debug folder of your webrole project , if yes then check in dependency checker the version of the .dll whether it’s x64 or x86.
If the version of the .dll is appropriate then try to stop the copying of msshrtmi.dll in bin/debug of your project by applying the following code in Build Event section of Proeject Property in your Webrole project.
Save it & compile the project.
Hope , this steps will help to remove the issues.