简体   繁体   中英

JavaScript Azure Function support in Visual Studio 2017/19 (NOT VS Code)

I am setting up an Azure Function (httpTrigger) written in JavaScript (NodeJS).

I have currently created it using Visual Studio Code (because all the tutorials and example I have found were using VS Code). But I would like to integrate the project into an existing Solution with multiple projects and continue development using Visual Studio 2017/2019.

After generating the extensions.csproj file via azure-functions-core-tools , I tried to include it as existing project into the solution but it ignored all other files (probably because it is not supposed to describe what files are included in the project?). In addition, the only way to have some meaningful name for the function is to have a folder, named after it, placed inside the solution, and to add the project itself inside that folder.

Can you guide me to a clean way to have a JavaScript Azure function inside a standard Solution with multiple other project and be able to work with it via Visual Studio 2017 or 2019?

Thank you!

Visual Studio Code does not create "project files" that you can open in Visual Studio 2017/2019. Basically, when you open up a Azure function in Visual Studio, you need to re-create the folder structure in VS2017 and create a "project file".

  1. Visual Studio Code is a folder oriented editor

    This means VSC has the same Point-of-View to your Project as the File Explorer.

  2. Visual Studio (not Code) is a solution oriented integrated development environment (short IDE).

Workaround would be a Blank Solution/project in which you set up your Visual Studio Code Project and add all the relevant files in project one by one.

Although Visual studio comes with the folder view feature which you can utilize it.

在此处输入图片说明

hope it helps.

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