Manish Chitre
Manish Chitre

Reputation: 121

Cannot AzureBlobStorage initialization in Bot Framework 4.9

I am implementing "AzureBlobStorage" by referencing "Microsoft.Bot.Builder.Azure", but when I initialize I get an error with "CloudStorageAccount".

Error CS7069 Reference to type 'CloudStorageAccount' claims it is defined in 'Microsoft.Azure.Storage.Common', but it could not be found QBotSolution

Startup.cs image:

Solution Explorer:

enter image description here

Upvotes: 1

Views: 156

Answers (1)

mdrichardson
mdrichardson

Reputation: 7241

It looks like Visual Studio can't determine which package you're trying to use. If you're just looking to do traditional bot state management, you should remove these packages:

  1. Azure.Storage.Blobs
  2. Microsoft.Azure.Cosmos.Table
  3. Microsoft.Azure.Storage.Blob
  4. Microsoft.Azure.Storage.Common

For bot Blob storage, you should only need Microsoft.Bot.Builder.Azure, so be sure to include using Microsoft.Bot.Builder.Azure; at the top of whatever file you're trying to use this in.

Here's a few good references:

Upvotes: 1

Related Questions