Developing Debug. NET Core 1.1 from scratch using vs code

Source: Internet
Author: User
Tags dotnet windows x64

Use vs Code to develop debugging. NET Core 1.1 from scratch. You can develop Debug. NET Core 1.1 applications without installing vs. RC.

The. NET Core 1.1 has been released for some time, and the biggest change has been the restore from Project.json back to csproj.

Today, Microsoft released the. NET Core SDK 1.0 RC4 version, which is also very close to the RTM version.

For. NET core 1.0 You can view the previous tutorials using vs code from scratch to develop debugging. NET Core 1.0.

This is the VS Code development. NET Core 1.1 tutorial, which is practical in Windows but applies to other systems as well.

Environment installation

This article demonstrates the development environment: WIN10 x64 Visual Studio Code 1.9.0

. NET Core SDK 1.0 RC4 Windows x64 Installer:

https://go.microsoft.com/fwlink/?linkid=841686

If you have installed a previous version of the SDK, it is recommended that you uninstall and install it first.

More system version Download:

Https://github.com/dotnet/core/blob/master/release-notes/rc4-download.md

Vscode:

https://code.visualstudio.com/

Vscode C # Plugins:

Ctrl+p Open the Quick Open input: Ext install CSharp Select C # installation.

Reboot vs Code after installing the plugin.

Highlights:

VS Code C # plug-in offline version 1.6.2

Note: This plugin is only applicable to Windows x64 system, other systems please use ext install CSharp to download the official plugin.

Create a project

First make sure that the. NET Core SDK is installed successfully.

Dotnet--version

The output is as follows:

1.0.0-rc4-004771

You can then create the project.

dotnet New Console

dotnet Restore

Dotnet Run

The entire command execution is complete.

The latest version of the SDK RC4 max changes to the dotnet New command.

dotnet New does not create a console app by default, but displays help, and displays different help based on the current directory content.

Empty folder:

Project folder:

Using VS Code Development

Use the VS Code to open the Core11 folder, open the Program.cs file, and wait a little, as shown in.

Select Yes. The plugin will automatically configure the Launch.json for us.

Attention:

If you install the C # plugin using ext install CSharp, you need to wait patiently for the first time you open it.

Because you need to configure. NET Core Debugger and download Omnisharp server.

If Omnisharp server is not running, it is because Omnisharp server was not downloaded.

Only a successful installation will have the smart prompt and the Add profile hint.

Then we switch to the Debug window and we can debug it.

The next breakpoint was successfully broken.

We can also easily write code, plug-ins to provide us with smart tips.

This way we can also develop. NET Core 1.1 without installing vs 2017.

If you think this article is helpful to you, please click " recommend ", thank you.

Developing Debug. NET Core 1.1 from scratch using vs code

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.