Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azurite Support on Visual Studio #1343

Open
justinyoo opened this issue Sep 29, 2019 · 21 comments
Open

Azurite Support on Visual Studio #1343

justinyoo opened this issue Sep 29, 2019 · 21 comments

Comments

@justinyoo
Copy link

I'm using Visual Studio 2017. and not sure whether it's the same issue on Visual Studio 2019 or not.

When I run VS2017 to debug an Azure Functions app, although I have Azurite running, it throws the error like this:

image

It seems that VS2017 only looks for Azure Storage Emulator. However, this document says that

Azurite is the future storage emulator platform. Azurite supersedes the Azure Storage Emulator.

It's OK it's not supporting Azurite at the moment, but I wonder whether:

  • There is an overriding feature to opt-out Storage Emulator and opt-in Azurite, and
  • When Azurite support is planned.

Just for the record, if I run the Function app in a command prompt by running the func host start, it's all good. The error only happens on Visual Studio.

@hebronwatson
Copy link

hebronwatson commented Jul 10, 2020

I'm having the same issue on VS2019, so a response would be appreciated.

@kmr299
Copy link

kmr299 commented Aug 21, 2020

I'm having the same issue on VS2019 😑

@kmr299
Copy link

kmr299 commented Aug 21, 2020

I was able to solve the problem by starting AzureEmulator manually.
To solve the problem, you must go to the "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator" path and run this command: "AzureStorageEmulator.exe start -inprocess" and run the project in visual studio again.

@RossHammerAtSterling
Copy link

RossHammerAtSterling commented Oct 16, 2020

I have just uninstalled my Azure Storage Emulator and installed Azurite per the messaging that the old storage emulator is out and this is now "the thing to use". Yesterday, before switching, my VS solution was running fine with the old Storage Emulator. Today, after the uninstall and new install, I just get a message from VS when I attempt to debug, "Could not locate the Azure Storage emulator executable." I cannot find any references to this anywhere else.

Microsoft Visual Studio Professional 2019
Version 16.7.2

λ azurite --version
3.9.0
λ azurite
Azurite Blob service is starting at http://127.0.0.1:10000
Azurite Blob service is successfully listening at http://127.0.0.1:10000
Azurite Queue service is starting at http://127.0.0.1:10001
Azurite Queue service is successfully listening at http://127.0.0.1:10001

image

Edit:
My configuration was using the recommended short-form connection value, "UseDevelopmentStorage=true".
When I switched it to the full HTTP connection string, it appears to be working so far.
https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite#http-connection-strings

@RossHammerAtSterling
Copy link

I was able to solve the problem by starting AzureEmulator manually.
To solve the problem, you must go to the "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator" path and run this command: "AzureStorageEmulator.exe start -inprocess" and run the project in visual studio again.

That assumes still using the old Azure Storage Emulator, which is no longer under development. The point of the OP is to use the new Azurite emulator.

@mwwhited
Copy link

It's really sad that the free dev tool stack is getting preferential treatment over those of us that spend hundreds if not thousands of dollars on development tools. Support for Visual Studio is required if you are deprecating the storage emulator.

@acrigney
Copy link

yes we need support for c#

@HenrikSommer-Energinet
Copy link

It seem you can get around this problem.
By change Azure Storage Emulator to a new default port change-running-ip-of-azure-storage-emulator

And starte Azurite on default port.
Then VS2019 will start storage emulator on new port but your function will run on Azurite (default port)

@SeanFeldman
Copy link

cc @anthonychu

@varlen
Copy link

varlen commented May 7, 2021

Doing it, I was only able to run my function in Visual Studio with Azurite after creating a $logs container manually through the REST API with curl -XPUT "http://localhost:10000/devstoreaccount1/%24logs?[SAS] where [SAS] is the SAS string. Refer this comment on how to create it.

@SeanFeldman
Copy link

@varlen you can work around it but it's not a solution. I'm using Rider and don't have to worry about creating $logs folder. That's not a solution though. Anyone using VS should be able to hit F5 and run.

@acrigney
Copy link

acrigney commented May 7, 2021 via email

@RDavis3000
Copy link

Its June 2021 and this is still not fixed

@anthonychu
Copy link
Member

You can start Azurite on your own and prevent VS from trying to start the Storage Emulator by adding this to your csproj: <StartDevelopmentStorage>false</StartDevelopmentStorage>. There's work happening in the VS team to better integrate with Azurite.

@mwwhited
Copy link

mwwhited commented Jun 9, 2021

You can start Azurite on your own and prevent VS from trying to start the Storage Emulator by adding this to your csproj: <StartDevelopmentStorage>false</StartDevelopmentStorage>. There's work happening in the VS team to better integrate with Azurite.

Good to know the thousands of dollars I've spent on Visual Studio Professional gets me better tooling... :/ constantly various dev teams from Microsoft talk about how a particular feature doesn't get much utilization so it gets tossed out or deprioritized (see inteillitest, code contracts, service bus emulator, architecture modeling, azurite, .Net 5 azure functions) and yet if you made the tools properly integrated in the skus the majority of paying users use you will see a massive uptick in usage.

We appreciate the effort but you guy was getting in a habit of only getting product and tools 80% useful and then you kill them off for the next shiny thing. It shouldn't be too much to ask for paying customers that want to love your products to get the integration and support they deserve.

@ghost
Copy link

ghost commented Oct 4, 2021

It's October 2021, two years from the initial report, and this still happens despite the fact that an article from as recently as August 2nd of this year tells us to use this tool instead of Azure Storage Emulator.

@anthonychu
Copy link
Member

Azurite is the default Storage emulator in VS 2022.

@louisoftokyo
Copy link

louisoftokyo commented Nov 1, 2021

Azurite is the default Storage emulator in VS 2022.

Does this apply to Visual Studio for Mac 2022 too?

@acrigney
Copy link

acrigney commented Nov 1, 2021 via email

@itorian
Copy link

itorian commented Nov 10, 2021

Faced the same issue, here are the steps to resolve it for Visual Studio 2019.

  1. Make sure to uninstall 'Azure Storage Emulator'
  2. Install azurite, you should see successfully started message, refer doc https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio#install-and-run-azurite
  3. In local.settings.json AzureWebJobsStorage value should be DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;

This would solve the issue.

@RobBowman
Copy link

Azurite is the default Storage emulator in VS 2022.

I'm using VS 2022 Enterprise v17.0.4. Azurite works ok with new Azure Functions (C#) projects. Is it possible to convince projects that were originally created using VS2019 to now use Azurite rather than the legacy storage emulator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests