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.

Unexpected results when filtering installed templates by type "project"

See original GitHub issue

From @scottaddie on March 5, 2018 21:4

Steps to reproduce

  1. Run the following command: dotnet new --type project

Expected behavior

I’d expect to only see project templates listed.

Actual behavior

In addition to project templates, I see the following item templates listed:

  1. Solution File
  2. Razor Page
  3. MVC ViewImports
  4. MVC ViewStart

Environment data

dotnet --info output:

.NET Command Line Tools (2.2.0-preview1-007866)

Product Information: Version: 2.2.0-preview1-007866 Commit SHA-1 hash: a99154ed46

Runtime Environment: OS Name: Windows OS Version: 10.0.16299 OS Platform: Windows RID: win10-x64 Base Path: C:\Users\scaddie.dotnet\x64\sdk\2.2.0-preview1-007866\

Microsoft .NET Core Shared Framework Host

Version : 2.1.0-preview1-26103-03 Build : 1d51767c35cb879c2388adf3d76722c6ad658c72

Copied from original issue: dotnet/cli#8727

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
seancpeterscommented, Mar 6, 2018

@scottaddie - it’s currently possible to list the templates by a specific language. For example, if you want to see only the F# templates, use: dotnet new -lang F#

In general, if your command line options can’t be resolved to a single template to invoke, a list of the templates that matched the options will be displayed (or if nothing matches the criteria, the entire list will be displayed).

Regarding showing the language for item templates, as long as the template specifies a language, that language will be displayed regardless of the template type. It just happens to be the case that none of the item templates included by default specify a language. You’re absolutely correct that the Razor Page, MVC ViewImports, and MVC ViewStart should include their language. I’ll update the issue I created accordingly.

0reactions
scottaddiecommented, Mar 22, 2018

@livarcocc This was fixed via https://github.com/aspnet/templating/pull/343. Feel free to close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Projects I'm On filter including unexpected results
The Projects I'm On filter includes projects that contain the user in any of its Project Details fields, including easily missed or automatically...
Read more >
New Project Dialog search and filtering take multiple ...
Templates, searching, and filtering templates appear pretty much instantly in other tools. I'd expect the same from Visual Studio. It's a poor first...
Read more >
Troubleshoot Unexpected Query Results
The Show Details option doesn't show for link, image, container, global filter panel, and text widget types because they don't have queries. The...
Read more >
Built-in template tags and filters
This document describes Django's built-in template tags and filters. ... Subsequently, this safe result will be fed to escape filter, which does not...
Read more >
Data Views - Flywheel.io
Filtering is straightforward on containers and metadata. Filtering on file attributes can lead to unexpected results or errors because files ...
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