- C# and .NET Core Test Driven Development
- Ayobami Adewole
- 469字
- 2021-06-25 22:00:34
Exploring Visual Studio Code
With the successful installation of Visual Studio Code on your Ubuntu instance, you need to perform initial environment setup before you can begin writing code using the editor:
- Launch Visual Studio Code from the Start menu and install the C# extension to the editor from Visual Studio Marketplace. You can launch the extension by pressing Ctrl + Shift + X, through the View menu and clicking Extension, and by clicking directly on the Extension tab; this will load a list of available extensions, so click and install the C# extension.
- When the extension has been installed, click on the Reload button to activate the C# extension in the editor:

- Open the folder of the console application you earlier created; to do that, click on the File menu and select Open Folder or press Ctrl + K, Ctrl + O. This will open the file manager; browse to the path of the folder and click open. This will load the content of the project in Visual Studio Code. In the background, Visual Studio Code will attempt to download the required dependencies for the Linux platform, Omnisharp for Linux and .NET Core Debugger:

- To create a new project, you can use the Integrated Terminal of the editor without having to go through the system terminal. Click on the View menu and select Integrated Terminal. This will open the Terminal tab in the editor, where you can type the commands to create a new project:

- In the opened project, you will see a notification that requires assets to build and debug the applications that are missing. If you click Yes, in the Explorer tab, you can see a .vscode tree with launch.json and tasks.json files added. Click the Program.cs file to load the file into the editor. From the Debug menu select Start Debugging or press F5 to run the application; you should see Hello World! displayed on the editor's Debug Console:

When you launch Visual Studio Code, it loads with the state it was in when it was closed, opening the files and folders that you last accessed. The editor's layout is easy to navigate and work with, and comes with areas such as:
- Status bar showing you information about the files you currently have opened.
- Activity bar provides access to the Explorer view for viewing your project folders and files, and Source Control view for managing a project's source versioning. Debug view for watching variables, breakpoints and debugging-related activities, Search view allows you to search folders and files. Extension view allows you to see available extensions that can be installed into the editor.
- Editor area for editing the project files, allowing you to open up to three files for editing simultaneously.
- Panel regions show different panels for Output, Debug Console, Terminal, and Problems:

推薦閱讀
- 自制編譯器
- Amazon S3 Cookbook
- Building a Quadcopter with Arduino
- Drupal 8 Module Development
- C/C++程序員面試指南
- Go語言精進之路:從新手到高手的編程思想、方法和技巧(2)
- Arduino可穿戴設備開發
- Illustrator CS6設計與應用任務教程
- Learning Jakarta Struts 1.2: a concise and practical tutorial
- Node.js 6.x Blueprints
- 企業級Java現代化:寫給開發者的云原生簡明指南
- 零基礎PHP從入門到精通
- 零基礎C語言學習筆記
- Learning Dynamics NAV Patterns
- Flink原理深入與編程實戰:Scala+Java(微課視頻版)