Use Dotnet Core under ubuntu15.10 or 16.04 or Elementryos

Source: Internet
Author: User
Tags dotnet net command net command line

Here we do not talk about installation, the lack of libicu52 self-installation.

The use of dotnet Restore or build after installation will fail, one is that the compiled DLL is not suitable for the current system, and the second is that compiling into the ubuntu16.04 folder will cause some problems. More troubling is that Visual Studio code cannot install. NET Core Debug.

So how to cheat. NET core Let it think that we are now Ubuntu 14.04 environment?

1. First we use dotnet--version

. NET Command Line Tools (1.0.0-beta-001793)

Product Information:
version:1.0.0-beta-001793
Commit sha:42a0eec967

Runtime Environment:
OS Name:ubuntu
OS version:14.04
OS Platform:linux
Runtime id:ubuntu.14.04-x64

2. Then search in the HTTPS://GITHUB.COM/ZLZFOREVER/CLI project: Runtime Id

3. Find out where the runtimeenvironment is sacred and the result is not found in the CLI project. The test is dependent, and the reference to the comparison several times is determined in the following: Microsoft.Extensions.PlatformAbstractions namespace

4. Speculation must still be open-source, so the global search on github.com

5. Find the final code

6. Modify ID and version_id

7. Okay, dotnet Core thinks your environment is Ubuntu 14.04.

Other types of Linux exams can also be used to spoof dotnet core.

Originally the CLI in version 1598 can use--runtime ubuntu.14.04-x64 to specify the run ID, but after 1793 cannot use this parameter. Actually modifying os-release is better than using--runtime, such as solving the problem of compiling dotnet core debug for Visual Studio Code

Use Dotnet Core under ubuntu15.10 or 16.04 or Elementryos

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.