Open Stekeblad opened 1 year ago
Why do you want to use this extension over the new built in feature?
I love how this extension quickly creates the right type of file with some basic code (like a empty c# class) by just telling it filename, location and extension.
I have to admit I have not looked into if there any options for the new feature but with the default settings it creates an empty file when doing the same steps as with Add New File.
To not get an empty file it looks like you need to click a button in the pop-up that opens the add new item window with all templates and you have to look for the right template. That is no big difference from the standard Visual Studio way before.
Additionally, if it has not improved since before I started using Add New File, so feels the Add New Item dialog slow and the template I wanted to use rarely was quickly accessible, often being under a different tab or having to scroll down in the template list.
While I think the extensions template selector is a bit limited in what you can do (*controller.cs is special cased in code but other suffixes can't have templates without modifying the extension code) this extension has a another benefit for being easy to create custom templates without having to create a special package or extension for them.
Same thoughts as @Stekeblad. It is unfortunate that we can't disable the new Add Quick File feature and continue to use this extension in VS Preview. I tried removing the new AddQuickFile
shortcut (Shift + F2) in the options, but doing that does not enable this extension prompt to show.
You can go to Options -> Environment -> Keyboard, remove the shortcut of "AddQuickFile", and assign "Shift+ F2" to "NewEmptyFile"
Thanks @tuliopaim , it works! Save my day!
As visual studio in "What's New?" says: applying templates will be support in Preview 2. We could look forward to the next version.
But so far, this extension still the most efficient way to add a new file.🧐
VS version 17.4.0 (non preview) has this as well. VS will only create an empty file. Nowhere near as good as the extension at them moment!
Why do you want to use this extension over the new built in feature?
One reason I ran into today: in your extension, I can write ../../Roles/MyNewType.cs
. It'll navigate upwards, auto-generate the folder Roles
, and generate the file.
VS's feature, meanwhile, will tell me (as of 17.5.0 Preview 1.0) that this contains illegal characters.
Why do you want to use this extension over the new built in feature?
It is broken, but your original works brilliantly. This one creates an empty file (no content). I use this numerous times per-day and love it. Until Microsoft fixes this new built-in feature, I am going with the solution by @tuliopaim above. Thanks again for all of your awesome work!
Anyone found a solution for this? I really miss the SHIFT + F2 feature in my workflow - the new empty files are driving me crazy
Check the @tuliopaim solution:
You can go to Options -> Environment -> Keyboard, remove the shortcut of "AddQuickFile", and assign "Shift+ F2" to "NewEmptyFile"
Check the @tuliopaim solution:
You can go to Options -> Environment -> Keyboard, remove the shortcut of "AddQuickFile", and assign "Shift+ F2" to "NewEmptyFile"
Thanks! Seems to work.
The solution @tuliopaim suggested is still working as of 11/28. Losing this extension derailed my afternoon. So happy I found this thread!
The solution @tuliopaim suggested is still working as of 11/28. Losing this extension derailed my afternoon. So happy I found this thread!
Here too. First tought that AddAnyFile extension was updated and broken somehow but luckily found this issue with the fix to disable AddQuickFile and restore NewEmptyFile.
how about add new shortcut likes "Shift+F3" or some others.
Why do you want to use this extension over the new built in feature?
I can not even find docs on AddQuickFile? So how would I even know how to use the feature?
Why do you want to use this extension over the new built in feature?
I can not even find docs on AddQuickFile? So how would I even know how to use the feature?
I can't comment on the docs. I don't know where they are. But the reason I like the extension more than AddQuickFile is AddNewFile will create a code behind file if you're using razor pages (most of the time) and scaffold c# classes with the namespace and proper file structure.
Visual Studio built in just does a blank file with the proper extension.
edit I got the feature and the extension switched around... 🙄🙄
Why do you want to use this extension over the new built in feature?
I can not even find docs on AddQuickFile? So how would I even know how to use the feature?
I can't comment on the docs. I don't know where they are. But the reason I like the extension more is AddQuickFile will create a code behind file if you're using razor pages (most of the time) and scaffold c# classes with the namespace and proper file structure.
Visual Studio built in just does a blank file with the proper extension.
Yes, the real question, IMO, is why bother adding the AddQuickFile feature at all if not going to do it correctly. This extension is hugely popular and probably the motivation so why not implement it all, and if not why stomp on the hot key?
Describe the bug The latest previews of Visual Studio 17.4 introduced a add new file dialog similar to the one by this extension and assigned it to the same keybinding (shift+F2). This resulted for me in that Visual Studio's own keybinding takes priority.
I have tried rebinding the keys for the dialog added to Visual Studio and then reinstalling the extension but can't get the Add New File dialog to show anymore.
I have tried looking for a keybinding registered by Add New File but can't find anything so I can't assign it a new either.
To Reproduce
Expected behavior Even after Visual Studio has added its own similar add new file dialog it should still be possible to use this extension and it's templates.