简体   繁体   中英

C# Azure WebJobs 3.x with Azurite in local development

With .NET Core the WebJobs are now a console application .

The new Azure Storage Emulator is Azurite .

The Visual Studio documentation about the azurite mentions only how to setup the start of azurite in Azure Functions and ASP.NET projects.

Is there a way to automatically start Azurite, when debugging a WebJobs 3 project in Visual Studio 2022?

As mentioned in the given MSDoc

Azurite is automatically available with Visual Studio 2022 .

AFAIK, for .NET Console Apps (Azure Web Jobs), there is no option to run the Azurite Automatically. We need to start it manually from the Command Prompt.

Check whether azurite.exe is available in the mentioned path.

C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator\

在此处输入图像描述

  • If you find the .exe file, then run the executable file在此处输入图像描述

在此处输入图像描述

My App.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
    </startup>
  <appSettings>
    <add key ="StorageConnection" value="UseDevelopmentStorage=true"/>
  </appSettings>
</configuration>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM