Reputation: 87087
I'm experimenting with Azure Functions (v3/latest at the time of this post).
When I hit F5 to run/debug the app, Microsoft Storage Emulator auto starts/kicks in. I prefer to use (the newer, superseding) Azurite as my emulator.
Is there a setting that can tell Visual Studio, that when I click F5, don't auto-start the Microsoft Storage Emulator ?
UPDATE:
This is not a question about connection strings. This is only about telling Visual Studio to -not- try and start the Microsoft Azure emulator.
Upvotes: 3
Views: 2338
Reputation: 436
To prevent the Azure Storage Emulator from starting automatically, just add the property <StartDevelopmentStorage>False</StartDevelopmentStorage>
to your .csproj.
Upvotes: 4
Reputation: 30035
As per Alex mentioned, if you don't want to auto-start local emulator, you should use the real connection string in local.settings.json
. Like below:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=xxxx;BlobEndpoint=https://xxx.blob.core.windows.net/;TableEndpoint=https://xxx.table.core.windows.net/;QueueEndpoint=https://xxx.queue.core.windows.net/;FileEndpoint=https://xxx.file.core.windows.net/",
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}
Since you're now using the real connection string, Visual studio will not use local emulator. Thus it will not be started at all.
Btw, I've already tested it(function v3 with latest nuget packages), local emulator behaves like I said.
Upvotes: 0