9

I'm trying to deploy to Azure Websites (Preview) from TFS (Preview). The build works and the website is deployed but when my code tries to access the Azure RoleEnvironment the website throws the following exception:

Could not load file or assembly 'msshrtmi, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I've tried all solutions proposed in the following thread with no luck. I think it has do to with the TFS.

I have tested this:

  • Reinstalled Azure SDK and Tools
  • Removed all PlatformTarget from projectfiles
  • Wrote post-build event to delete msshrtmi.dll
  • Targeted all assemblies to x64 (-> failed all unit tests on TFS, it seems to be x86, even if allowing x64 in .testsettings)

Could not load file or assembly 'msshrtmi' or one of its dependencies (Azure Table Storage Access)

I've ran out of ideas on how to troubleshoot this issue? Does anyone have any suggestions?

Community
  • 1
  • 1
Jonas Stensved
  • 14,378
  • 5
  • 51
  • 80
  • 1
    I'm stuck with this same issue, though in my case a Worker role fails to deploy due to this issue. :( I think it has something to do with the latest SDK preview for VS2012 RC – SalGad Jun 27 '12 at 15:50
  • 3
    Why is this marked as a possible duplicate? It's the same error but the solutions (even the one marked as correct) isn't solving this. I search for similar posts before asking, I even linked to the one referenced? – Jonas Stensved Jul 02 '12 at 09:39
  • 1
    Yes agree with Jonas. Its 100% clear if you take the time to read the two posts that this is not an 'exact duplicate'. What are you doing George ? Did you read both posts ? – Matt Randle Sep 08 '12 at 15:47
  • I nominated this to be reopened. I'm experiencing a similar issue (http://social.msdn.microsoft.com/Forums/en-US/azuretfs/thread/8fd9dbec-532d-4dea-865b-080beef45266), and this is not a duplicate. – Ben Collins Dec 21 '12 at 19:35

3 Answers3

1

I've encountered a similar issue in earlier versions of the SDK when doing some builds. My solution wasn't entirely intuitive. If I go through each of my build configurations and do a "Clean Solution" then go back to the build configuration I actually care about and do a build this issue goes away.

I have no explanation as to why this works, but after hours pulling my hair out, I was just happy to have a solution.

knightpfhor
  • 9,299
  • 3
  • 29
  • 42
1

After 7 hours of mindblowing trial and error I finally fixed this. The problem lay with having Microsoft Windows Azure tools for June 2012 together with Microsoft Windows Azure tools for November 2011.

The steps I followed:

  • Remove Microsoft Windows Azure tools For Visual Studio 2012 RC - June 2012
  • Install Microsoft Windows Azure tools for Visual Studio 2010 - June 2012 Edition
  • Remove Microsoft Windows Azure tools for Visual Studio 2010 - November 2011 Edition
  • Now re-open the project that was trying to be deployed
  • Visual Studio will try to convert all the November 2011 binaries to the June 2012 edition
  • Once this is successfully done, re-check all the Microsoft.WindowsAzure references to see if they are version 1.7.0.0
  • Publish to Azure!

Hope it helps someone, I'm so tired I'm not coding for the next 24 hours.

SalGad
  • 2,991
  • 2
  • 18
  • 25
  • Thanks, i've uninstalled the VS2010 and reinstalled. I built the project in the release VS2010 - June 2012 from scratch. Still no luck. I did move to a Cloud Service which made it work. – Jonas Stensved Jun 29 '12 at 09:03
  • Can you give more details on your solution? Glad you made it work, I can relate to the frustration. – SalGad Jun 29 '12 at 09:53
0

I had the same problem where it was always looking for the 32 bit version of msshrtmi in 64bit app causing an error like this. I never found out why but I created build task in my project that would delete the offending 32bit file from the bin so 64bit is found in GAC.

Craig
  • 36,306
  • 34
  • 114
  • 197