How to shutdown Azurite process that was started by Visual Studio 2022?

223 Views Asked by At

Visual Studio 2022 > Connected Services > Storage Azurite emulator (Local)

On most searches I've read that Azurite is a Node.js process which can only be stopped from cmd.exe via ctrl-c or closing cmd.exe window ( or obviously restarting OS ).

On project startup VS will start Azurite process but without a cmd.exe window.

Azurite process will live on even after VS is closed.

It's not clear how to stop the Azurite process started by VS.

Also what I find peculiar is this exe :

C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator\azurite.exe

If Azurite is Node.js then what is this ?

1

There are 1 best solutions below

0
Jahnavi On

How to shutdown Azurite process that was started by Visual Studio 2022: -

As you mentioned already, it is correct that Azurite is a Node.js process which can be stopped with ctrl-c cmd.exe in cmd window.

enter image description here

The azurite.exe file works as a wrapper for the Node.js process. Visual Studio uses this to launch Azurite with certain configurations and environment variables required for its integration.

When Visual Studio is managing Azurite, it utilizes this wrapper instead of directly executing the Node.js executable.

But there are few other approaches to stop the Azurite process completely which are detailed below.

  1. You can use taskkill command to kill the azurite process by providing process ID (PID) or directly azurite.exe name along with the command. Note: Obtain the process ID from VS Azurite running window. Or execute tasklist command to get the process related details.

    tasklist /fi "services eq Azurite"
    taskkill /F /IM azurite.exe or taskkill /pid PID /f
    

enter image description here

  1. Use taskmanager by searching in the start menu in your pc and search for azurite >> end task as shown below.

enter image description here

  1. And the last approach would be with the visual studio window itself. Right click on the storage emulator under your application and click on disconnect. The process will get stopped automatically.

enter image description here

References: Blog, taskkill