Use VS Code Development .NET CORE program guide

1 Introduction

The past two years, many students are beginning the front of the VSCode as the main front-end development tool, an extension to its rich program development, especially front-end development has brought a lot of convenience, but as the main language of Microsoft's .NET, but because of the universe first editor Visual Studio exist, few see the students to use the back end, the author himself when VSCode just come out toss off the main development tools will migrate to VSCode, so you can do cross-platform development (actually at that time wanted to try on Mac doing development), but it was due to the plug-in is not perfect, tossing process is relatively pit, then give up, continue to embrace the universe first editor.

Recently a little time, again toss VSCode, has been basically completed pleasantly surprised to find most of the development work with VSCode, first process to share out, for those who like to toss the students reference.

Note: This article is for the .NET CORE rather than just .NET Framework development, and the need for VSCode basic operations have a certain understanding, if you're still writing a .NET Framework or never used VSCode, need to first understand some basic knowledge.
Official Documents

2. The plug-in installation instructions

  1. Will install the plug-in:
    • C#
    • C# Extensions

      With these plug-ins, it has been basically can write C # code in VSCode, the basic IntelliSense, syntax highlighting and other functions can be used.

      intllisense

  2. Advanced Installation
    • VSCode-icons

      VSCode-icon may be added to the file icon files in a directory, for us to distinguish the type of the file

      icons

    • VSCode-solution-explorer

      A problem migrating from Visual Studio over students is relatively large, familiar with the original solution disappeared, pure self-management file with the way it always awkward and install this plug-in, VSCode will increase in a menu, the original the familiar Visual Studio mode of operation is back, specific look:

      solution1

      With this plugin, we in the solution or project right, respectively, will pop up the corresponding shortcut menu, meet some of our daily routine operations development:
      • Create a new project
      • Add / Remove Files
      • Compile / Packaging
      • Move items to the specified folder
      • other

      For example folder under the project in the specified file, easy to manage:

      solution2

    • Visual Studio Keymap

      The plug can be used to shortcut keys to the Visual Studio VSCode, such as formatting codes shortcut Ctrl + K + D
      keymap

    • C# XML Documentation Comments

      The plug-in is mainly can easily add code comments, such as /// in Visual Studio,
      xml

    • NuGet Package Manager
    • NuGet NuPkg Viewer

      Currently add nuget package, due to the country you know, leads to the query version of the time will complain, can not be installed properly, right-csproj suggest that you direct the project file to add the appropriate nuget package, on this issue, we can focus on GitHub Issue

    • .NET Core Test Explorer

      After my test, .NET Core Test Explorer plug-in unit testing problems can not be found for MS Test, unit testing is recommended that you use as a component xunit

      unittest

      Note: Unit testing must be configured Test Project Path in the current Workspace : the project name unit testing, but can also add setting.json file in the root directory of the current project .VSCode, and add the following configuration items:

      { 
       "dotnet-test-explorer.testProjectPath": "unittest" 
      } 

3. Postscript

With the support of the above plug-ins, we can basically use VSCode develop .NET CORE applications, but due to the network will be some problems when installing the package Nuget Currently, the author is currently using Visual Studio to add a reference to the various components of the package, using VSCode do develop, the whole process down, or competent.

Because before I was Reshaper heavy users, like Alt + Enter shortcut to do some quick shortcuts, and VSCode will also have some quick instructions, but not the shortcut Alt + Enter, need custom modifications, amend as follows (with Li also other shortcuts in this change):
quick

Finally, VSCode support for Spring Boot is quite friendly, but also use VSCode worked on before I java program, especially those who need NET and JAVA while developing students who are interested can also toss themselves down, so I do not remember two quick key, and it's open VSCode much faster than IDEA.

Guess you like

Origin www.cnblogs.com/xboo/p/11431222.html