dotnet / dotnet/project-system

Error Rank of restore errors should be higher than other errors

Open
#3,778 1 comment 4 reactions 0 assignees View on GitHub
Feature-Error-List Feature-NuGet Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

1. Build the following project:

``` C#
// Program.cs
using System;

namespace ConsoleApp167
{
class Program
{
static void Main(string[] args)
{
JObject obj = new JObject();

Console.WriteLine(obj);
}
}
}

```

``` XML


netcoreapp1.1



```

```
Error NU1102 Unable to find package FooBar with version (>= 1.0.0)
- Found 4 version(s) in NuGet.org [ Nearest version: 0.1.8.12 ]
- Found 0 version(s) in C:\Program Files\dotnet\sdk\NuGetFallbackFolder ConsoleApp167 c:\users\davkean\source\repos\ConsoleApp167\ConsoleApp167\ConsoleApp167.csproj 1
Error CS0246 The type or namespace name 'JObject' could not be found (are you missing a using directive or an assembly reference?) ConsoleApp167 c:\users\davkean\source\repos\ConsoleApp167\ConsoleApp167\Program.cs 9 Active
Error CS0246 The type or namespace name 'JObject' could not be found (are you missing a using directive or an assembly reference?) ConsoleApp167 c:\users\davkean\source\repos\ConsoleApp167\ConsoleApp167\Program.cs 9 Active
```

Expected: For the restore failure to be the first error
Actual:

```
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'JObject' could not be found (are you missing a using directive or an assembly reference?) ConsoleApp167 c:\users\davkean\source\repos\ConsoleApp167\ConsoleApp167\Program.cs 9 Active
Error CS0246 The type or namespace name 'JObject' could not be found (are you missing a using directive or an assembly reference?) ConsoleApp167 c:\users\davkean\source\repos\ConsoleApp167\ConsoleApp167\Program.cs 9 Active
Error NU1102 Unable to find package FooBar with version (>= 1.0.0)
- Found 4 version(s) in NuGet.org [ Nearest version: 0.1.8.12 ]
- Found 0 version(s) in C:\Program Files\dotnet\sdk\NuGetFallbackFolder ConsoleApp167 c:\users\davkean\source\repos\ConsoleApp167\ConsoleApp167\ConsoleApp167.csproj 1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.