在.net核心项目上恢复包时出错

时间:2016-11-28 10:39:10

标签: visual-studio visual-studio-2015 .net-core

我无法找到一种方法来为我的.net核心项目进行包恢复。 我刚从visual studio创建了一个新的空项目。 创建项目模板并尝试还原包后,我收到此错误

log  : Restoring packages for C:\WebApplication1\src\WebApplication1\project.json...
Error: Error reading JToken from JsonReader. Path '', line 1, position 8994.

我尝试安装最新版本的.net core 1.1 SDK和Runtime,并修复了visual studio 2015的安装。但没有任何效果。

编辑:

这是从visual studio

创建的project.json
 {
  "dependencies": {
    "Microsoft.AspNetCore.Diagnostics": "1.0.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.NETCore.App": {
      "version": "1.0.1",
      "type": "platform"
    }
  },
  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },
  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },
  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },
  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config"
    ]
  },
  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

global.json

{
  "projects": [ "src", "test" ],
  "sdk": {
    "version": "1.0.0-preview2-003133"
  }
}

环境数据

dotnet --info  output:
dotnet --info
.NET Command Line Tools (1.0.0-preview2-003133)

Product Information:
 Version:            1.0.0-preview2-1-003133
 Commit SHA-1 hash:  74df06500c

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.1.7601
 OS Platform: Windows
 RID:         win7-x64

感谢您的帮助

0 个答案:

没有答案