简体   繁体   中英

Migrate asp.net core React-Redux WebApp from VS2017 to Visual Studio Code?

I tried loading the solutions folder in Visual Studio Code however the build configurations are all wrong and I wasn't able to figure out how to tell VS Code which project to run.

To further complicate things I 'deleted' the folder structure in VS Codes solution explorer and now I can't see the folder structure when I try and load the same folder directory.

VSCode doesn't support the .sln files the same way as VS. It is a directory based editor first of all, not a full IDE. For example, the VSCode Explorer is used to browse, open, and manage all of the files and folders in your project (workspace).

All workspace settings are stored inside your workspace in a .vscode folder and only apply when the workspace is opened. Settings defined on this scope override the user scope. It may help to think about workspace as a root folder that was used to open the project in VSCode.

In general, to be able to build, debug and run the application in VSCode, you need to configure build task and launch configuration.

VS Code provides a conception of

  • tasks to allow actions like project building. Tasks are defined in task.json file;
  • launch configuration so you can run/debug app. Launch configs are described in launch.json .

VSCode looks for this files also in your workspace's .vscode folder.

During the configuration process, if you need to specify a path to something in your project, it is common practice to define it as a relative path to this workspace folder by using ${workspaceRoot} variable.

If you install C# for Visual Studio Code (powered by OmniSharp) extension, it helps you to generate appropriate configurations for .NET Core projects.

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