aspnet / Routing

[Archived] Middleware for routing requests to application logic. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
272 stars 122 forks source link

Unable to find package when attempting to run benchmarks #842

Closed drieseng closed 6 years ago

drieseng commented 6 years ago

When I attempt to run the benchmarks in master I get the following errors:

Target type: MatcherBuilderAzureBenchmark
// ***** BenchmarkRunner: Start   *****
// Found benchmarks:
//   MatcherBuilderAzureBenchmark.Dfa: Job-COIXDO(Runtime=Core, Server=True, Toolchain=.NET Core 3.0, RunStrategy=Throughput)

// Validating benchmarks:
// ***** Building 1 benchmark(s) in Parallel: Start   *****
// ***** Done, took 00:00:02 (2.18 sec)   *****
// Build Exception:   Restoring packages for D:\Development\Repos\Routing\benchmarks\Microsoft.AspNetCore.Routing.Performance\bin\Release\netcoreapp2.2\e680257f-f95e-4afb-94ff-570872d73899\BenchmarkDotNet.Autogenerated.csproj...
D:\Development\Repos\Routing\benchmarks\Microsoft.AspNetCore.Routing.Performance\bin\Release\netcoreapp2.2\e680257f-f95e-4afb-94ff-570872d73899\BenchmarkDotNet.Autogenerated.csproj : error NU1102: Unable to find package Microsoft.NETCore.App with version (>= 3.0.0)
D:\Development\Repos\Routing\benchmarks\Microsoft.AspNetCore.Routing.Performance\bin\Release\netcoreapp2.2\e680257f-f95e-4afb-94ff-570872d73899\BenchmarkDotNet.Autogenerated.csproj : error NU1102:   - Found 1004 version(s) in https://dotnet.myget.org/F/dotnet-core/api/v3/index.json [ Nearest version: 3.0.0-preview1-27006-01 ]
D:\Development\Repos\Routing\benchmarks\Microsoft.AspNetCore.Routing.Performance\bin\Release\netcoreapp2.2\e680257f-f95e-4afb-94ff-570872d73899\BenchmarkDotNet.Autogenerated.csproj : error NU1102:   - Found 43 version(s) in nuget.org [ Nearest version: 2.2.0-preview2-26905-02 ]
D:\Development\Repos\Routing\benchmarks\Microsoft.AspNetCore.Routing.Performance\bin\Release\netcoreapp2.2\e680257f-f95e-4afb-94ff-570872d73899\BenchmarkDotNet.Autogenerated.csproj : error NU1102:   - Found 40 version(s) in https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json [ Nearest version: 2.1.0-preview2-26308-01 ]
D:\Development\Repos\Routing\benchmarks\Microsoft.AspNetCore.Routing.Performance\bin\Release\netcoreapp2.2\e680257f-f95e-4afb-94ff-570872d73899\BenchmarkDotNet.Autogenerated.csproj : error NU1102:   - Found 0 version(s) in https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json
  Generating MSBuild file D:\Development\Repos\Routing\benchmarks\Microsoft.AspNetCore.Routing.Performance\bin\Release\netcoreapp2.2\e680257f-f95e-4afb-94ff-570872d73899\obj\BenchmarkDotNet.Autogenerated.csproj.nuget.g.props.
  Generating MSBuild file D:\Development\Repos\Routing\benchmarks\Microsoft.AspNetCore.Routing.Performance\bin\Release\netcoreapp2.2\e680257f-f95e-4afb-94ff-570872d73899\obj\BenchmarkDotNet.Autogenerated.csproj.nuget.g.targets.
  Restore failed in 1,27 sec for D:\Development\Repos\Routing\benchmarks\Microsoft.AspNetCore.Routing.Performance\bin\Release\netcoreapp2.2\e680257f-f95e-4afb-94ff-570872d73899\BenchmarkDotNet.Autogenerated.csproj. 

I followed the Building from source instructions. Building the sources works just fine (using both VS and dotnet build).

What am I missing?

drieseng commented 6 years ago

@JamesNK Any idea?

rynowak commented 6 years ago

Did you run build.cmd first? Those scripts acquire the required version of the runtime - which include Microsoft.NETCore.App

drieseng commented 6 years ago

Yes, I ran build.cmd /t:restore as mentioned on Building from source.

It works just fine on the release/2.2 branch. This may be because that one uses the .NET Core 2.2 toolchain, while master uses .NET Core 3.0.

JamesNK commented 6 years ago

I encountered the same error on the 3.0 branch a few weeks ago. I think I resolved it by changing the environment path to dotnet install folders. I'm not completely sure because I was trying to fix another problem and it suddenly resolved itself.

mkArtakMSFT commented 6 years ago

@drieseng, did you get a chance to try @JamesNK's suggestion:

...I think I resolved it by changing the environment path to dotnet install folders...

mkArtakMSFT commented 6 years ago

Hi. We're closing this issue as we have heard no response from you for some time now. If you have more details and are encountering this issue please add a new reply and re-open the issue.