Vscode Net Core 2.0 MVC

Source: Internet
Author: User
Tags dotnet

1. Directory structure

2. Run this command to restore the new MVC file structure

dotnet New Sln-n project file name without suffix name CD Web folder name dotnet new MVC

Generate the corresponding DLL file

3, Configuration Launch.json

1 {2     //use IntelliSense to understand related properties. 3     //hover to view the description of an existing property. 4     //For more information, please visit: https://go.microsoft.com/fwlink/?linkid=8303875"Version": "0.2.0",6"Configurations": [7         {8"Name": ". NET Core Launch (web)",9"Type": "CoreCLR",Ten"Request": "Launch", One"Prelaunchtask": "Build", A"Program": "${workspacefolder}/web folder name/bin/debug/netcoreapp2.0/web folder name". dll ", -"Args": [], -"CWD": "${workspacefolder}/web folder name", the"Stopatentry":false, -"Internalconsoleoptions": "Openonsessionstart", -"Launchbrowser": { -"Enabled":true, +"args": "${auto-detect-url}", -"Windows": { +"Command": "cmd.exe", A"args": "/C start ${auto-detect-url}" at                 }, -"OSX": { -"Command": "Open" -                 }, -"Linux": { -"Command": "Xdg-open" in                 } -             }, to"Env": { +"Aspnetcore_environment": "Development" -             }, the"Sourcefilemap": { *"/views": "${workspacefolder}/views" $             }Panax Notoginseng         }, -         { the"Name": ". NET Core Attach", +"Type": "CoreCLR", A"Request": "Attach", the"ProcessId": "${command:pickprocess}" +         } -     ] $}

4. Modify the configuration Tasks.json file

1 {2     //See https://go.microsoft.com/fwlink/?LinkId=7335583     //For the documentation about the Tasks.json format4"Version": "2.0.0",5"Tasks": [6         {7"Label": "Build",8"Command": "Dotnet Build",9"Type": "Shell",Ten"Group": "Build", One"Presentation": { A"Reveal": "Silent" -             }, -"Options":{ the"CWD": "${workspaceroot}/web folder name" -             }, -"Problemmatcher": "$msCompile" -         } +     ] -}

Then you can have a pleasant debug run! ^_^

Vscode Net Core 2.0 MVC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.