DotNetCore.1.0.1-VS2015Tools. Preview2.0.3 problems and solutions, enablepreviewtools

Source: Internet
Author: User

DotNetCore.1.0.1-VS2015Tools. Preview2.0.3 problems and solutions, enablepreviewtools

In 16th day of this month, MS released. NET Core 1.1. As a friend of the MS product, I first downloaded the relevant installation package and then installed it decisively ).

I guess you may have encountered the same problem as me when reading this blog.

Problem 0: Correct installation as required

The correct sequence can be found on the official website of MS dotnet Core. Please check your VS version.

If you think this is too long or you have doubts, the short version is:

1. VS2015

 

1. check if Update3.3 is installed in VS2015: Open VS2015 and click Help> Microsoft Visual Studio. if the version number below the Logo on the left is earlier than 14.0.25431.01, you need to install Update3.3; if the version is not Update3, you must first install Update3 and then install Update3.3.

 

2. Download and install. NET Core 1.1 SDK (x64/x86)

 

3. Download and install DotNetCore.1.0.1-VS2015Tools. Preview2.0.3

2. VS2017RC

 

Select "NET Core and Docker (Preview)" during installation.

Because VS2017 is installed with the DotnetCore1.0.0-preview3-004056, and the use of csproj format project files, so and VS2015 experience will be different, please think twice before installation.

 

Question 1: DotNetCore.1.0.1-VS2015Tools. Preview2.0.3 File Installation is not normal

This problem was probably encountered by many people when 1.0.1 was released in March. From the perspective of the phenomenon, it seems that MS has forgotten to replace its own revoked SSL certificate. Of course, it does not rule out the possibility of accidentally killing GFW. Fortunately, after more than two months of unremitting efforts, this certificate seems to be normal, so now the main fight is the network speed.

If your network environment is not ideal, you can obtain the offline layout of DotNetCore.1.0.1-VS2015Tools. Preview2.0.3 in a high-speed environment and then distribute the installation. The specific method is as follows:

 

Command Format

\> DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe/layout <layout directory>

Sample:

\> DotNetCore.1.0.1-VS2015Tools. Preview2.0.3/exe/layout. \ DotnetCoreTooling110

You can create a DotnetCoreTooling110 directory in the current directory.New directoryThe following dotnetcore.1.0.1-vs2015tools.preview2.0.3.exe file can be installed with ease.

 

Question 2: Create and upgrade an existing project

Because the SDK and Tooling are released this time and no template is updated, the template used by the existing Dotnet Core project is still 1.0.1. But don't worry. The specific template Upgrade Method in the introduction to ASP. NET Core 1.1 RTM is as follows:

 

1. In the project. json collection, upgrade the [netcoreapp] and [Microsoft. NetCore. App] versions from 1.0 to 1.1, and save the project. json file.

2. Upgrade the nuget package in Dependency. We recommend that you back up the existing project. json file before the upgrade. This is because I have encountered an upgrade failure and damaged the project file. Be prepared.

 

Question 3: The compilation fails after the upgrade, and the system prompts that the Framework ". NetCoreApp, Version = 1.1" compatible with the runtime cannot be found.

After VS reported an error, three possible causes were returned. The first option is ignored. If no nuget package is restored, the project status remains at issue 2. If it is confirmed that the restoration failed, you should continue to change the project. json file.
The second method works the same way as the third method, that is, developers want to give a RID, so that VS can know what the corresponding runtime environment is. However, in this way, the current FDD (dependency framework deployment) program is converted into a SCD (independent deployment) program.

Here we will not discuss the advantages and disadvantages of the two types of deployment, because it is as boring as comparing the advantages and disadvantages of C # and JAVA, just to show how to implement:

FDD, in fact, figure 1 uses this deployment, but the writing method is slightly different:

 

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.1.0",
      "type": "platform"
    },

    ……
  }
  "frameworks": {
    "netcoreapp1.1": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  }
}

 

SCD, the key point is to add runtimes, frameworks, dependencies and do not need to be changed:

 

{
  "frameworks": {
    "netcoreapp1.1": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },
  "runtimes": {
    "win10-x64": {}
  }
}

Conclusion

The above are some of the problems and solutions that DotnetCore1.1 has encountered in the past week. We hope to help you and try the 1.1-fold performance improvement as soon as possible (although it is only a text output test, but it is also the first among the deployable servers)

 

Author: Zhang Junyi

Blog: https://www.cnblogs.com/soldout

The copyright of this article is shared by the author and the blog Park. You are welcome to repost this article. However, you must retain this statement without the author's consent and provide a clear link to the original article on the article page. Otherwise, you will be held legally liable.

Related Article

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.