我在Windows 10 Professional上使用VS Studio 2015 Professional Edition来开发.NET Core应用程序。
在安装VS 2017 Edition并重新启动操作系统之前,一切正常。
现在,我创建它的任何项目似乎都无法安装依赖项:
project.json:
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
global.json:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003131"
}
}
安装了SDK:
右键单击项目 - > 还原包显示以下内容:
PATH=.\node_modules\.bin;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\git
C:\Program Files\dotnet\dotnet.exe restore "c:\Projects\SampleApp\.vs\restore.dg" -s "C:\Program Files (x86)\Microsoft SDKs\NuGetPackages"
c:\Projects\SampleApp\.vs\restore.dg(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
但是,如果我去使用" dotnet restore
"在项目目录中的命令,它似乎恢复依赖项并正常工作。
我检查过一些变通方法here,但没有工作。