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.

dotnet new with preview builds should succeed

See original GitHub issue

I run into this problem frequently. I know what the problem and various workarounds are, however I would like to see an inbox solution to it. This experience shouldn’t happen, IMO. Restore should succeed for preview builds.

Richards-MacBook-Pro-2:~ rlander$ dotnet new console -o testapp
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on testapp/testapp.csproj...
  Restoring packages for /Users/rlander/testapp/testapp.csproj...
/Users/rlander/testapp/testapp.csproj : error NU1102: Unable to find package Microsoft.NETCore.App with version (>= 2.1.0-preview2-26313-01)
/Users/rlander/testapp/testapp.csproj : error NU1102:   - Found 27 version(s) in nuget.org [ Nearest version: 2.1.0-preview1-26216-03 ]
/Users/rlander/testapp/testapp.csproj : error NU1102:   - Found 1 version(s) in CliFallbackFolder [ Nearest version: 2.0.0-preview2-25407-01 ]
  Generating MSBuild file /Users/rlander/testapp/obj/testapp.csproj.nuget.g.props.
  Generating MSBuild file /Users/rlander/testapp/obj/testapp.csproj.nuget.g.targets.
  Restore failed in 163.1 ms for /Users/rlander/testapp/testapp.csproj.

Restore failed.
Post action failed.
Description: Restore NuGet packages required by this project.
Manual instructions: Run 'dotnet restore'

Richards-MacBook-Pro-2:~ rlander$ cd testapp/
Richards-MacBook-Pro-2:testapp rlander$ dotnet restore
  Restoring packages for /Users/rlander/testapp/testapp.csproj...
/Users/rlander/testapp/testapp.csproj : error NU1102: Unable to find package Microsoft.NETCore.App with version (>= 2.1.0-preview2-26313-01)
/Users/rlander/testapp/testapp.csproj : error NU1102:   - Found 27 version(s) in nuget.org [ Nearest version: 2.1.0-preview1-26216-03 ]
/Users/rlander/testapp/testapp.csproj : error NU1102:   - Found 1 version(s) in CliFallbackFolder [ Nearest version: 2.0.0-preview2-25407-01 ]
  Restore failed in 153.14 ms for /Users/rlander/testapp/testapp.csproj.
Richards-MacBook-Pro-2:testapp rlander$ 

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Petermarcucommented, Mar 20, 2018

Yeah, in the short term, I have thought that making preview builds drop nuget.configs with the projects would be the best experience.

@richlander I assume this is because you are downloading from the daily builds listed on the cli readme? Those are also incoherent so even the nuget cache lzma is just a complete waste of time and space I think 😦

Longer term, I’d like to explore an experience where NuGet is not needed to resolve platform refs or to run apps that just depend on the platform.

0reactions
Petermarcucommented, Mar 23, 2018

That said, we need to be a little careful because we are likely to change that preview source in the future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet build command - .NET CLI
The dotnet build command builds a project and all of its dependencies.
Read more >
ASP.NET Core updates in .NET 8 Preview 7
NET 8 Preview 7 is now available and includes many great new improvements to ASP.NET Core. Here's a summary of what's new in...
Read more >
Announcing .NET 8 Preview 6
We're delighted to let you know about the latest features and improvements coming with .NET 8 Preview 6! This release is a continuation...
Read more >
Announcing .NET 8 Preview 5
We're excited to share all the new features and improvements in .NET 8 Preview 5! This release is a follow-up to the Preview...
Read more >
Announcing .NET 8 Preview 4
We're excited to share all the new features and improvements in .NET 8 Preview 4! This release is a follow-up to the Preview...
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