dotnet new with preview builds should succeed
See original GitHub issueI 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:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
That said, we need to be a little careful because we are likely to change that preview source in the future.