16th this month, Ms released a . NET Core 1.1 . As a small pot of products with the penetration of MS, I first time the relevant installation package downloaded, and then decisive installation (into the pit).
I guess you might have the same problem as me when you come to this blog.
Issue 0: Correct installation requirements
The correct order in MS's dotnet Core official web can be found, please according to your own version of VS.
If you think this is too long or in doubt, the short version is:
1, VS2015
1. Check to see if VS2015 has installed Update3.3: Open VS2015, then click "Help"-"About Microsoft Visual Studio", the left logo below the version number if less than 14.0.25431.01, need to install Update3.3,If the version number is not Update3, you need to install Update3andthen install Update3.3.
2. Download and install the. NET Core 1.1 SDK (x64 / x86)
3. Download and install dotnetcore.1.0.1-vs2015tools.preview2.0.3
2, VS2017RC
When installing, select "NET Core and Docker" to
Since VS2017 installs dotnetcore1.0.0-preview3-004056 and uses csproj format project files, there is a difference between the experience and VS2015, think twice before installing .
Issue 1: dotnetcore.1.0.1-vs2015tools.preview2.0.3 file is not installed properly
When the issue was released in September, it was estimated that many people had met 1.0.1. From the symptoms it seems that Ms forgot to replace the home has been revoked the SSL certificate, of course, do not rule out the possibility of GFW accidentally killed. Fortunately, after two months of unremitting efforts, this certificate seems to be normal, so now the main fight is the speed.
If your network environment is not ideal, you can get dotnetcore.1.0.1-vs2015tools.preview2.0.3 offline layout in a better speed environment, and then distribute the installation, the method is as follows:
Command format
\>dotnetcore.1.0.1-vs2015tools.preview2.0.3.exe/layout < layouts for storage >
Sample
\>dotnetcore.1.0.1-vs2015tools.preview2.0.3/exe/layout. \dotnetcoretooling110
Follow the way, you can create a DotnetCoreTooling110 directory in the current directory, you can simply run the directory under the Dotnetcore.1.0.1-vs2015tools.preview2.0.3.exe file will be able to install the rest assured.
Issue 2: Create and upgrade an existing project
because this release is the SDK and tooling, there is no update template, so the existing dotnet core project used by the original template is 1.0.1. But don't worry,the specific template upgrade method in the introduction of ASP. NETCore 1.1 RTM :
1. Project.json collection upgrade from 1.0 to 1.1 in the "Netcoreapp" and "Microsoft.NetCore.App" versions, then save the Project.json file
2, upgrade dependency in the NuGet package, it is recommended to back up the existing Project.json files before upgrading. Because I have encountered an upgrade failure, but also the project file is broken. It's a precaution.
Issue 3: The compilation failed after the upgrade, prompting that the runtime-targeted framework could not be found. netcoreapp,version=1.1 "Compatible runtime
VS error, it gives us three possible triggers for the error. The first one is not considered, because all nuget packages are not restored, stating that the status of the project remains in question 2. If you confirm that the restore failed, you should continue to change the Project.json file.
The second method and the third method are actually the same principle, which is to expect the developer to give a RID, so that vs knows what the corresponding operating environment is. But doing so would turn the current FDD program into a SCD program.
The pros and cons of the two models are not discussed here, just show how to do it:
Fdd:
{
"Dependencies": {
"Microsoft.NETCore.App": {
"Version": "1.1.0",
"Type": "Platform"
},
......
}
"Frameworks": {
"netcoreapp1.1": {
"Imports": [
"dotnet5.6",
"Portable-net45+win8"
]
}
}
}
Scd:
{
"Frameworks": {
"netcoreapp1.1": {
"Imports": [
"dotnet5.6",
"Portable-net45+win8"
]
}
},
"Runtimes": {
"Win10-x64": {}
}
}
Conclusion
The above is a week since the early DotnetCore1.1 encountered problems and solutions, hope can help everyone, and experience as soon as possible 1.1 to bring 759 times times the speed of ascension, and welcome you to shoot bricks.
dotnetcore.1.0.1-vs2015tools.preview2.0.3 Related problems and solutions