(Mac OS platform) upgrade. NetCore1.0 official version note,. netcore1.0
The. NetCore1.0 official version was finally released yesterday. When I went back last night, I was able to upgrade a. NetCore project. I still encountered some problems. Record them here.
1. Restore Problems
This problem has always been solved. The main reason is that our project uses internal components and the company's source needs to be referenced during restoration.
After the source is configured in Visual Studio For Mac, it cannot be restored successfully. After several attempts, it still does not work, it also seems that the configuration source in Visual Studio For Mac is independent and does not affect the configuration in the system.
So we still use Net Command Line to resotre. First, configure the source (/Users/<User Name>/. nuget/NuGet. Config). When configuring the Nuget source, specify the V2 or V3 version. The company's source is V2. At first I directly configured it to 3, and the result failed all the time. This problem also pitted me for a while. Later I noticed that the original V2 source is in XML format and V3 is in Json format. Post an error message: (is not a valid JSON object)
Dotnet restore is successfully modified to version 2.
2. migrate problems.
In Visual Studio For Mac, the Migrate still fails. This time, I am too lazy to try it. I will directly use the command line Migrate.
Switch to the project directory and use dotnet migrate to restore the file. I didn't have the command ??? It's awesome. Then we can use dotnet -- info to check whether it is Priview2. Then I switch to another directory to view the info information, which is the official version 1.0.1. The information is as follows:
After getting depressed, I decided to uninstall all dotnet core sdks. Uninstall Script: https://github.com/dotnet/cli/blob/rel/1.0.0/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh and then reinstall the latest version. The dotnet Migrate conversion is successfully re-run.
Ps: I also asked in the group at the time. @ Hangzhou-Zeeko and I said that the SDK version should be specified in global. json. Just change it. Because I had uninstalled and reinstalled it, I didn't try it. This is the reason. It will be verified.
It can be seen that Visual Studio For Mac is still a lot of pitfalls, and Command Line is more convenient.