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.

Consider adding a class item template

See original GitHub issue

Add dotnet new class

dotnet new class is an expected path to new users. Without it, we assume the user adds new .cs file through their file explorer or their editor. I’m contributing to docs to make this clearer, but ideally it’d be a simple command that creates a Class1.cs file in the current directory.

using System;

namespace <ParentFolder>
{
    public class Class1
    {

    }
}

Customer filed issue on this.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
YuliiaKovalovacommented, Jan 30, 2023

Hi @Mrxx99 ,

I moved your suggestion to a separate ticket for further discussion. The third point isn’t included due to existing parser restrictions and the ratio between gain/loss for the implementation.

1reaction
seancpeterscommented, Dec 6, 2018

Ah, for the parent directory, you mean the directory the project is being created in (class item in this case). That we can do, I was mis-thinking a directory one up in the path - which really makes no sense 😃. When niether the -o nor the -n option are provided, the current directory is implicitly used as the value of “name” parameter, which is usually used to replace the namespace. That’s a function of how the template is authored - easy enough to setup for this purpose.

Read more comments on GitHub >

github_iconTop Results From Across the Web

visual studio - Cannot find Class template in Add New Item
I tried devenv /installvstemplates but this did not help. enter image description here. I think I may be missing something from this folder:....
Read more >
Class template missing from Add Class
Right-click on Solution Explorer and select Add Class, the “Class” template is missing from Common Items in the Add New Item form.
Read more >
Custom Item Templates in Visual Studio - YouTube
Have you ever found yourself starting a file out the same way every time in Visual Studio? Maybe you always add an empty...
Read more >
Create item templates - Visual Studio (Windows)
Add an item template to the Add New Item dialog box. Create or open a project in Visual Studio. Add an item to...
Read more >
Templates for projects and files - Visual Studio (Windows)
Item templates, such as code files, XML files, HTML pages, and Style Sheets, appear in the Project > Add New Item dialog box....
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