question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Restore fails for 'dotnet new -l F#' created project

See original GitHub issue

Steps to reproduce

I am validating a tool called dotnet watch for the next release and as part of it, I would like to test it with a non-C# based project. I tried doing a dotnet new -l F# but the restore fails.

Expected behavior

Restore succeeds and able to run dotnet run successfully

Actual behavior

Errors in C:\temp\contoso\project.json
    Unable to resolve 'Microsoft.NETCore.App (>= 1.0.0-rc2-3002677)' for '.NETCoreApp,Version=v1.0'.

NuGet Config files used:
    C:\temp\contoso\NuGet.Config
    C:\Users\kichalla\AppData\Roaming\NuGet\NuGet.Config
    C:\ProgramData\nuget\Config\Microsoft.VisualStudio.Offline.config

Feeds used:
    https://api.nuget.org/v3/index.json
    https://www.myget.org/F/fsharp-daily/api/v3/index.json
    https://dotnet.myget.org/F/dotnet-cli/api/v3/index.json

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-rc2-002673)

Product Information:
 Version:     1.0.0-rc2-002673
 Commit Sha:  c0aeb91d61

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

The project.json that was created is below:

{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": true,
    "compilerName": "fsc",
    "compile": {
      "includeFiles": [
        "Program.fs"
      ]
    }
  },
  "dependencies": {
    "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160316",
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.0-rc2-3002673"
    }
  },
  "tools": {
    "dotnet-compile-fsc": {
      "version": "1.0.0-*",
      "imports": [
        "dnxcore50",
        "portable-net45+win81",
        "netstandard1.3"
      ]
    }
  },
  "frameworks": {
    "netstandard1.5": {
      "imports": [
        "portable-net45+win8",
        "dnxcore50"
      ]
    }
  }
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brthorcommented, May 6, 2016

Add this:

<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />

To the NuGet.config you had earlier and give it a try.

0reactions
TheRealPiotrPcommented, May 6, 2016

I’m going to assume that the [||] is an intended output of the app. If we’re seeing that dotnet run is appending a funny string to the output then please open another issue to track 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting NuGet Package Restore in Visual Studio
In this case, run msbuild -t:restore followed by msbuild , or use dotnet build (which restores packages automatically).
Read more >
Package Restore Failed / .Net Core Install Bug
Right Click on the project and select Restore Packages in the context menu.This should fix the issue. enter image description here. Share.
Read more >
[2.1-rc1] dotnet clean fails when obj folder is missing #2226
This is an issue on our CI server, where we run dotnet clean as the first step of every build, and then run...
Read more >
Fixing NuGet error: Unable to load the service index for source
Solution 1. Use a NuGet config file. ... To work around this, I am creating a new nuget.config file and populating it with...
Read more >
Dotnet restore clean. cs files) Removing information from ...
The dotnet workload restore command analyzes a project or solution to determine which workloads it needs, then installs any workloads that are missing....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found