Cannot dotnet run templates created via build.cmd
See original GitHub issueDescribe the bug
When contributing to the templates, the steps to build and create templates to test does not work as expected following the steps in the README
To Reproduce
Steps to reproduce the behavior:
- Follow steps to build templates from source in this repo
- Attempt to
dotnet rungenerated template
Expected behavior
Get below error, looks like the project is not pointed to the framework built from source
It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '3.0.0-dev' was not found.
- The following frameworks were found:
2.1.9 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2.1.11 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2.2.3 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2.2.5 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
3.0.0-preview5-19227-01 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The .NET Core frameworks can be found at:
- https://aka.ms/dotnet-download
Additional context
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview5-011568
Commit: b487ff10aa
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview5-011568\
Host (useful for support):
Version: 3.0.0-preview5-27626-15
Commit: 61f30f5a23
.NET Core SDKs installed:
2.1.507 [C:\Program Files\dotnet\sdk]
2.1.604 [C:\Program Files\dotnet\sdk]
2.1.700-preview-009618 [C:\Program Files\dotnet\sdk]
2.1.700 [C:\Program Files\dotnet\sdk]
2.1.800-preview-009677 [C:\Program Files\dotnet\sdk]
2.2.204 [C:\Program Files\dotnet\sdk]
2.2.300-preview-010067 [C:\Program Files\dotnet\sdk]
2.2.300 [C:\Program Files\dotnet\sdk]
2.2.400-preview-010195 [C:\Program Files\dotnet\sdk]
3.0.100-preview5-011568 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview5-19227-01 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview5-27626-15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview5-27626-15
[C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Can't run code using the 'dotnet' run command in Visual ...
The .NET Build System does not work with loose .cs files (or F# or VB.NET for that matter); it needs at least a...
Read more >dotnet new <TEMPLATE> - .NET CLI
The dotnet new command creates new .NET projects based on the specified template.
Read more >How to install and use a project template using dotnet CLI
This generated a .zip file which was dumped in a generic Templates folder in the Visual Studio installation directory. According to the link...
Read more >Can't pass a name to filter with dotnet new --list #1926
--dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation....
Read more >Create .NET Core Projects with the Command Line - YouTube
Every . NET project is based on a project template. Want to learn more about the ones that ship "in the box"? Want...
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 Free
Top 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

After doing a clean clone and talking with @ryanbrandenburg, I got it working. Closing
@ryanbrandenburg how else we can help here? @aspnet/build do you have any suggestions regarding this?