ASP.NET Core Bluemix sample+VS 2015 update 3

119 views Asked by At

I created a ASP.NET Core cloud foundry apps in IBM bluemix, which works fine. But when I download and try to build in VS 2015 update 3, I am not able to restore the packages hence getting the following error:

PATH=.\node_modules.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\git
C:\Program Files\dotnet\dotnet.exe restore "C:\Users\c8\Downloads\HelloWorld(1).vs\restore.dg"
log : Restoring packages for C:\Users\c8\Downloads\HelloWorld(1)\src\dotnetstarter\project.json...
error: Unable to resolve 'Microsoft.Extensions.Configuration.CommandLine (>= 1.0.0)' for '.NETCoreApp,Version=v1.0'.
log : Writing lock file to disk. Path: C:\Users\c8\Downloads\HelloWorld(1)\src\dotnetstarter\project.lock.json
Errors in C:\Users\c836774\Downloads\HelloWorld(1)\src\dotnetstarter\dotnetstarter.xproj
Unable to resolve 'Microsoft.Extensions.Configuration.CommandLine (>= 1.0.0)' for '.NETCoreApp,Version=v1.0'.
log : C:\Users\c8\Downloads\HelloWorld (1)\src\dotnetstarter\dotnetstarter.xproj
log : Restore failed in 966ms.

Update:

Added project.json config details:

{
    "buienter code hereldOptions": {
        "copyToOutput": {
            "include": [ "wwwroot" ]
        },
        "debugType": "portable",
        "emitEntryPoint": true,
        "preserveCompilationContext": true
    },

    "publishOptions": {
        "include": [ "wwwroot" ],
        "exclude": [ "**.user", "**.vspscc" ]
    },

  "dependencies": {
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0",
    "Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.1"
    }
  },

    "frameworks": {
        "netcoreapp1.0": {
            "imports": [
                "portable-net45+wp80+win8+wpa81+dnxcore50"
            ]
        }
    },

    "scripts": { },

    "version": "1.0.0"
}
1

There are 1 answers

0
Swathi Sathya Prakash On

I dint try that though, however changing my nuget.config to following helped me resolve the issue.

   <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!--To inherit the global NuGet package sources remove the <clear/> line below -->
    <clear />
    <add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
    <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>