8

When publishing my cloud service from Visual Studio 2015 I get this error:

10:11:26 AM - Instance 0 of role MySite is ready
10:11:26 AM - Instance 1 of role MySite is ready
10:11:27 AM - Starting...
10:11:45 AM - Initializing...
10:11:46 AM - Created web app URL: http://mysite.cloudapp.net/
10:11:46 AM - Complete.
10:11:46 AM - Could not load type 'Microsoft.Cct.Services.Sqm.IWatSqmService' from assembly 'Microsoft.VisualStudio.WindowsAzure.Services, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

This happens at the end of deployment and the site seems to be deployed but Visual Studio still says the deployment failed. How do I fix that?

6
  • Are you meaning that your site could be updated and accessed successfully? As I Known, Microsoft.VisualStudio.WindowsAzure.Services is a library of Windows Azure Tools. Please try to update Microsoft Azure SDK for .NET to the latest version.
    – Bruce Chen
    Nov 30, 2016 at 10:14
  • Yes, the site is accessible after the deployment. I've updated SDK to 2.9.6 a few days before but can't say if the update caused the issue or something else. Nov 30, 2016 at 12:23
  • 1
    We are looking into the problem, but we don’t have a solution yet. If you upgrade your cloud service project to 2.9, the error should no longer occur. We’ll post back to this thread when we know more about the problem. Dec 5, 2016 at 19:12
  • I got the same problem. Upgraded to version 2.9 and then everything worked as it should. Thanks @MikkelMørkHegnhøj
    – Fredrik
    Dec 5, 2016 at 21:34
  • @MikkelMørkHegnhøj We are unable to update our projects to 2.8 and this is now stopped our work in its tracks. Any progress on your end? Dec 6, 2016 at 18:31

4 Answers 4

17

I solved this issue today and see you guys have as well. Took me a solid day of re-installing SDK and running repairs with no resolution. Issue occurs on projects created before Azure SDK 2.9.x and after the latest 2.9.6 SDK is installed. For whatever reason - Visual Studio doesn't seem to recognize older versions of the project properly - namely where to go for the assemblies - hence 'Could not load type'. Usually, it prompts you to upgrade the solution - but this fails so here is the manual way to see if an upgrade is available or to perform the upgrade yourself.

Check For Upgrade

  • Right click Azure Cloud project (assuming you have installed Azure SDK NET to 2.9.6) and click Properties.

  • Navigate to the Application tab (if not there) and see a message that states (for older versions) Click here to Upgrade the project to the latest SDK format.

Manual Alternative
Convert a line (about line 9) in your "AZURE.CCPROJ" file in your Azure Solution folder: <ProductVersion>2.8</ProductVersion> needs to be
<ProductVersion>2.9</ProductVersion>

Convert another line (about line 66) in the same file from:
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.8\</CloudExtensionsDir>

To:
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.9\</CloudExtensionsDir>

Clean solution afterwards, close solution, then restart Visual Studio and open your project.

Note: You may get a failed to debug error afterwards, claiming it can't find a specific folder. Don't fret and try changing your Configuration from "Debug" to one of the other configuration options - I think some older projects used configuration "Development" for debug. That's a case by case basis.

Note 2: To those who can't upgrade, you should try and reinstall SDK 2.8.2 and verify the \2.8\ folder is in existence. Also need to uninstall 2.9.6 first - pre-requisites such as the Azure emulator can't co-exist with other versions.

2
  • 1
    I kept getting a sequence contains no elements error after upgrading and had to restart VS before i could publish. Just a note to anyone who comes across that error after upgrading. Feb 3, 2017 at 12:59
  • 1
    I appended my last line before the notes. I had intended for users to restart Visual Studio but didn't explicitly state that, so thanks!
    – HouseCat
    Feb 3, 2017 at 13:31
1

Based on your description, it seems that something went wrong when you update Azure SDK to 2.9.6. For this type issue, I would suggest you to reinstall Azure SDK. It should fix this issue. We could download the SDK at this link. Please try it. If you still have some issues, please come back with more detailed info.

1
  • Added a solution to this problem - can you pass it along to Microsoft? Opening Azure Project that was built on version 2.8 - without being prompted to upgrade the Solution. Sometimes you are prompted - but I was not on the first 3 or 4 solutions. CCPROJ file is merely pointing to \2.8\ reference assemblies even if you don't have 2.8 assemblies.
    – HouseCat
    Dec 6, 2016 at 17:48
1

I got this when working in Visual Studio 2013 on a 2.8 project. I had 2.8 and 2.9 installed.

My issues was that I was using the CloudConfigurationManager.GetSetting("your.setting.here") when I hadn't added it to the .cscfg or .csdef files properly.

Check that all your settings are defined, and that you have referenced the correct Microsoft.WindowsAzure.Storage DLL too, as this can be used with the CloudConfigurationManager settings.

0

What has worked for me is just uninstalling everything SDK 2.7 related and upgrading my Azure project to 2.9 as mentioned by @Mikkel Mørk Hegnhøj

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.