I'm trying to run an instance of the Azure Blob Storage in the Azure Visual Studio 2010 development environment, but keep getting the following error:
System.InvalidOperationException: Not running in a hosted service or the Development Fabric.
The stack trace is pointing to these lines:
Imports Microsoft.WindowsAzure
Imports Microsoft.WindowsAzure.Diagnostics
Imports Microsoft.WindowsAzure.StorageClient
...
CloudStorageAccount.SetConfigurationSettingPublisher(Function(configName, configSetter) configSetter(ConfigurationManager.AppSettings(configName)))
Dim this_storage_account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString")
...
I'm a little dubious about the first line as it comes from a c# interpretor output of what appears to be a common hack to get around a quirk of the CloudStorageAccount class.
DataConnectionString is set to UseDevelopmentStorage=true
Both the Development Fabric and Development Storage are running in the task bar.
I've tried creating a clean solution to see if this was a configuration issue, but am still getting the same error.
Any ideas gratefully received.