I\'ve created a sample project using dotnet, but I get the following error when building the project:
dotnet
error : The project was restored using Mic
It seems Visual Studio is using different .NET Core versions for restore/build/publish.
To resolve this issue, you could add TargetLatestRuntimePatch attribute in the .csproj file:
netcoreapp2.0 true
For details, please see this page.