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.


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.

 

cd $(TargetDir)  

del msshrtmi.dll

Save it  & compile the project.

Hope , this steps will help to remove the issues.

Advertisements

About Anindita
Anindita Basak is working as Big Data Cloud Consultant in Microsoft. Worked in multiple MNCs as Developer & Senior Developer on Microsoft Azure, Data Platform, IoT & BI , Data Visualization, Data warehousing & ETL & of course in Hadoop platform.She played both as FTE & v- employee in Azure platform teams of Microsoft.Passionate about .NET , Java, Python & Data Science. She is also an active Big Data & Cloud Trainer & would love share her experience in IT Training Industry. She is an author, forum contributor, blogger & technical reviewer of various books on Big Data Hadoop, HDInsight, IoT & Data Science, SQL Server PDW & PowerBI.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: