Coder Social home page Coder Social logo

addanyfile's People

Contributors

ariesdane avatar chucker avatar cihanuygun avatar kiritchoukc avatar lancelot-coder-chen avatar madskristensen avatar mapitman avatar maraf avatar reduckted avatar sameera avatar sandercox avatar sqlop avatar timheuer avatar tkharaishvili avatar upta avatar yangzhinong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

addanyfile's Issues

The 'AddAnyFilePackage' package did not load correctly

Installed product versions

  • Visual Studio: 2013 Ultimate
  • This extension: 3.4.104

Description

When opening a solution in Visual Studio 2013 I am presented with the dreaded The 'AddAnyFilePackage' package did not load correctly. error message.

Steps to recreate

  1. Install the VSIX
  2. Open an existing solution

Current behavior

When opening a solution in Visual Studio 2013 I am presented with the dreaded The 'AddAnyFilePackage' package did not load correctly. error message.

The ActivityLog.xml file contains the following entries:

  <entry>
    <record>803</record>
    <time>2016/06/13 19:45:59.336</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [AddAnyFilePackage]</description>
    <guid>{27DD9DEA-6DD2-403E-929D-3FF20D896C5E}</guid>
    <hr>80070002</hr>
    <errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
  </entry>
  <entry>
    <record>804</record>
    <time>2016/06/13 19:45:59.336</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [AddAnyFilePackage]</description>
    <guid>{27DD9DEA-6DD2-403E-929D-3FF20D896C5E}</guid>
    <hr>80004005 - E_FAIL</hr>
    <errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
  </entry>

Expected behavior

Solution opens and package loads properly

Shorthand for adding multiple files

Add support for adding multiple files from the dialog if the user provides a comma separated list of file names. This would be especially helpful for SPA components that leverage.html templates with .js view models.

Example 1:

IEmployee.cs, Employee.cs

Gold Plated version:

SPA / MVVM style components often follow the pattern of (component-name<.html|.js>), in this situation users would likely prefer a shorthand syntax for specifying just the extensions.

Example 2:

widget1[.js][.html] // creates widget.js and widget.html
widget1[js][html] // works the same - leading period is optional

Example 3

webform1[.aspx][.aspx.cs] // creates webform1.aspx and webform1.aspx.cs
webform1[aspx][aspx.cs] // works the same - leading period is optional
webform1.aspx[cs] // only creates webform1.apsx.cs

Example 4

widget1[js][html], widget2[js][html], site.css // creates widget1.js, widget1.html, widget2.js, widget2.html, and site.css

Set default encoding when saving the file

Hello,

First of all thanks for the plugin, it is super helpful.

I would like that you could specify what encoding format there should be used when saving a file.

For example i have used the plugin to create .html files. It gives some problems because I have to use UTF-8 encoding because I have some Nordic characters in the html file like: æøå.

At the moment the files created with the AddAnyFile plugin always save the files with ANSI encoding.

Allow to add file anyplace

Installed product versions

  • Visual Studio: 2015 Enterprise
  • This extension: Just added, so last version

Description

Thanks for the Awesome extension.

Current behavior

Now, If I was in folder A, and hit shift+F2, I can add files & folder to current folder.

Expected behavior

But I think will be better if you ignore current place and allow the user to create files & folder from root.

Cannot add a new file in a solution with multiple projects, unless using the default visual studio menu first.

Installed product versions

  • Visual Studio: 2017 all versions
  • This extension: 3.5.129

Description

The extension cannot create a new file, when inside a solution with mutliple projects..
visual studio supports creating multiple projects within one solution and can distinguish easily between them.

Steps to recreate

  1. create a c++ empty project.
  2. you should now have 1 project in your solution.
  3. add a new file with "AddAnyFile" call it "main.c" without qoutes
  4. add new project, using the default visual studio add option call it "project 2"
  5. right click the new project, click on "set as startup project"
  6. add a new file again with "AddAnyFile".
  7. nothing happens..
  8. if you use the default visual studio add menu you will be able to create the file.
  9. after you've created a new file using the default visual studio menu, you'll then be able to use this extension. and add files normally, but not until you've used vs' default menu

Current behavior

does not support multi project setup.

Expected behavior

create the file regardless

Feature: Create generic files

It would be nice to be able to create generic files directly.

The convention we use is MyClass{T}.cs and the file contains class

public class MyClass<T>
{
}

The class name created now is MyClass{T} which is an incorrect class name. I also understand that other projects have different conventions so there could be a template file.

Error Message when creating new file

Installed product versions

  • Visual Studio: [example 2015 Professional]
  • This extension: 2.4.72

Description

When I try to create a new file and press Shift-F2, I get a dialog to input the name of the file.
I input a standard filename with extension ".cs", then an error message pops up:

"Could not create test.cs"
"Falscher Parameter. (Ausnahme von HRESULT: 0x80070057 (E_INVALIDARG))"

Translatet this means:
"Wrong parameter. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"

After clicking OK in the error message dialog box you can validate, that the file is created in contrast to the message of the error dialog.

Steps to recreate

  1. Select any folder
  2. Press Shift-F2
  3. input any filename
  4. Press OK
  5. Get Error message
  6. Validate that file is created and added to git in spite of the error message

Current behavior

Error message is displayed for each creation of a file

Expected behavior

No error message is displayed.

Causing issues in SSDT projects

Installed product versions

  • Visual Studio: 2015 Professiional
  • This extension: Add New File 3.3

Description

When adding new .sql files under (ex) dbo\Tables, the files get created in the right place on the disk but end up at the root of the project as a 'miscellaneous file'. This causes issues where files need to be manually deleted (as the project doesn't allow you to move them to fix it). I get an error dialog when trying to move the file back into the right place. This doesn't apply to just dbo\Tables ... Your extension seems to have compatibility issues with SSDT entirely.

Steps to recreate

  1. Expand dbo, Tables and select the Tables node
  2. Hit Shift-F2
  3. Type Test.sql

Current behavior

The file ends up at the root of the project and is treated as a 'miscellaneous file'. On the disk, it is saved in the right place.

Expected behavior

It should end up being treated the same as any other tables created through the Add New File dialog.

Error Message 0x80004005

Installed product versions

  • Visual Studio: VS2017 Community Version 15.2(26430.13)
  • This extension: 3.5.129

Description

16.06.2017 09:34:31: System.Runtime.InteropServices.COMException (0x80004005): Beim Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL-Fehler zurückgegeben.
bei EnvDTE80.DTE2.ExecuteCommand(String CommandName, String CommandArgs)
bei MadsKristensen.AddAnyFile.AddAnyFilePackage.d__2.MoveNext() in C:\projects\addanyfile\src\AddAnyFilePackage.cs:Zeile 114.

Steps to recreate

Install in ViS via "Extension And Updates" - "Online" - "Visual Studio Marketplace"
Open a .NET project, add a "test.html" file wirh "New Empty File"

Current behavior

The file is correctly created but the message under ###Description appears in output window of VS

Expected behavior

No error message

Can't install your extension in new VS"15"Preview

Hi,

Installed product versions

  • Visual Studio: [15 Preview]

Description

At build 2016 Microsoft released Visual Studio 15 Preview.
There are some extensions that work there, but some that are not even searchable in "Extensions and Updates". Yours is one of those that are not searchable and not installable.

Steps to recreate

  1. Install Visual Studio 15 Preview: https://www.visualstudio.com/en-us/downloads/visual-studio-next-downloads-vs.aspx (Visual Studio "15" Preview with new installer)
  2. Open VS15Preview
  3. Open Extensions and Updates
  4. Click on Online in the menu
  5. Search for Add New File
  6. Your extension doesn't pop up

Current behavior

Your extension is not searchable in new Visual Studio 15 Preview

Expected behavior

Your extension should or could be also in VS15Preview :)

Btw, I created recently one analyzer and made it to be an extension and it works there fine:
https://github.com/jakubsuchybio/DebuggingUsingsInsertor-Analyzer
If you needed something to compare yours setup of extension with.
Regards.

Menu item doesn't work and file not added to solution

Selecting the New Empty File... option from the context menu does nothing.

If I use the keyboard shortcut the file is created in the correct folder, but it is not added to the solution or opened in the editor.

Is there somewhere I can get a log file from?

Suggestion about removing the modal and implement the new folder UX

I very much like the way the new folder UX works. Instead of a modal, it creates a temporary to be named file on filesystem (empty).

If it's possible, may I suggest that design change?

If you need extra options for some files (like a controller with views, etc) to actually be on a modal, I can suggest to bring that up after the file name is chosen, and only if necessary.

Add test class template

Wouldn't it be nice to enable quick creation of a C#/VB.NET test classes by using the *Test.cs convention? I would be happy to contribute!

Add 2 files in VS 2015

Noticed this in a new ASP.Net vNext project. When I right click on a folder and add a new file, the file gets added to both the selected folder and the solution root.

Adding new files/folders very slow with Preview 3 of 2017 (.NET Core projects)

Installed product versions

  • Visual Studio: [example 2017 Preview 3]
  • This extension: [example 3.5.129]

Description

Might be an issue with VS2017-P3, but wanted to be sure it wasn't something odd. Since it is a .NET Core project, creating the file/folder should be all it does (as no project file needs to be touched, in fact sometimes I get a csproj entry (most times I don't) which is problematic.

Steps to recreate

  1. Start new .NET 2.0 Core project in VS2017 Preview 3
  2. Use Shift-F2 to open extension
  3. Add 'Foo/Bar.ts' or similar.
  4. Wait, wait, wait...eventually adds the file.

Current behavior

Slow. (I have a quad core, 32GB fast RAM, 3TB SSD machine, nothing should be this slow.

Expected behavior

Should be much faster.

Download for Visual Studio 2012

Somehow my instance of Visual Studio 2012 was able to automatically update to the current version on the Marketplace, even though it does not support 2012. Now the extension does not work anymore. Is there somewhere that I can download the latest version that supports 2012?

How to build?

Installed product versions

  • Visual Studio 2015 Enterprise

Description

After cloning and installing extensibility SDK, I can't actually build. A bunch of references aren't resolving, and I'm unsure where they should be coming from (I would have thought the SDK, but apparently not):

image

I noticed that at least some of this stuff is on NuGet, but they were not added as NuGet dependencies.

Steps to recreate

  1. Clone on fresh machine
  2. Install extensibility SDK
  3. Try to build

Current behavior

Unable to build due to missing references.

Expected behavior

Should be able to build.

New file encoding

Hi Mads,
whenever I create new file using your extension (I use it especially for README.md and such) I have to go to File / Advanced Save Options... to change the encoding of the file to UTF-8 with signature as the file is created using default Windows encoding (in opposite to files created using VS or R# where there is UTF from the very beginning).

Add "Copy if newer" checkbox/dropdown

I often use the extension to add test files which needs to be copied to output dir. It's tedious to go to properties and switching "Copy to output directory" to "Copy if newer" for each new file. I though it would be nice to have a option right in the AddAnyFile dialog box.

What do you think?

PS: Oh, and thank you for the extension, it's really cool.

Folder already exists exception

I tried using this pluing in Node.js project in VS2015, but it throws "Folder already exists" error when I tried to create a new JavaScript file.

What I do is:

  1. Right click on "app" folder, select Add new empty file
  2. The dialog shows app/[enter filename text field]
  3. I type the filename, for example "test.js" and click OK
  4. It throws an error telling me that it can't create test.js inside of my "app" folder, because this folder already exists??

Crash when trying to add file on project

Installed product versions

  • Visual Studio: Community 2015 update 3
  • This extension: 3.5.116

Description

When right-clicking on the project and selecting Add->New empty file, I get a "Microsoft Visual Studio has stopped working"
Same goes when selecting the project and pressing ctrl-F2.
When doing the same on the wwwroot folder inside the project, It seems to be working fine.

Commas in filenames create multiple files

Installed product versions

  • Visual Studio: 2017 Enterprise
  • This extension: 3.5.129

Description

Using commas in file names creates multiple files.

Class{T1,T2,T3}.cs is a valid file name and a pattern often used.

Steps to recreate

  1. Shift+F2
  2. Class{T1,T2,T3}.cs

Current behavior

Creates files:

  • Class{T1
  • T2
  • T3}.cs

Expected behavior

Creates file Class{T1,T2,T3}.cs

Extension Disabled

Installed product versions

  • Visual Studio: 2015 Professional
  • This extension: 3.5.110

Description

I keep enabling this extension and it keeps getting disabled by something else and I have no idea what or why.

Steps to recreate

No specific steps - this presumably is a problem for you or it is not.

Current behavior

The extension keeps getting disabled.

Expected behavior

When enabled the extension should stay enabled until I manually disable it.

Mixed EOL characters (CRLF / LF) when adding files

Installed product versions

  • Visual Studio: 2015
  • This extension: 3.3.98 (latest)

Description

I've always thought it has been visual studio's fault but adding a new file normally doesn't produce this problem. This is what an added c# file looks like:

capture

You can see that the EOL chars are mixed.
I'm using this extension to visualize EOL characters.

To reproduce simply try adding a c# file.

I usually directly close and open the file, visual studio will then tell me that the file has mixed EOL endings and offers help.

Suggestion - add file extension automatically

Just a suggestion. I'm used to VS "new class" window where .cs extension is added automatically so it's just a muscle memory to omit it with AddAnyFile. I end up creating new files with no extension, deleting them and adding again with .cs almost every time. Wouldn't be nice if we look into the directory and if all the files have the same extension just use it when none specified.

Not working anymore on C# Shared Projects (since VS 15.8.1)

Installed product versions

  • Visual Studio: 2017 Enterprise 15.8.1
  • This extension: 3.5.129

Description

Not working anymore in C# Shared Projects (used to work just fine until last update)

Steps to recreate

  1. Create a C# Shared project
  2. Press Shift+F2 to add new file
  3. Type any name

Current behavior

The file is created on disk, but not in the project.
An exception is thrown:

22-Aug-18 13:35:03: System.NotSupportedException: No item can be placed here.
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.<AddItemWithSpecificAsync>d__613.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProjectItems.<AddItemAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProjectItems.<>c__DisplayClass4_0.<<AddFromFile>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func`1 asyncMethod, JoinableTaskCreationOptions creationOptions)
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func`1 asyncMethod)
   at Microsoft.VisualStudio.ProjectSystem.ProjectMultiThreadedService.ExecuteSynchronously[T](Func`1 asyncAction)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProjectItems.AddFromFile(String fileName)
   at MadsKristensen.AddAnyFile.ProjectHelpers.AddFileToProject(Project project, FileInfo file, String itemType) in C:\projects\addanyfile\src\Helpers\ProjectHelpers.cs:line 108
   at MadsKristensen.AddAnyFile.AddAnyFilePackage.<MenuItemCallback>d__2.MoveNext() in C:\projects\addanyfile\src\AddAnyFilePackage.cs:line 94
22-Aug-18 15:16:41: System.NotSupportedException: No item can be placed here.
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.<AddItemWithSpecificAsync>d__613.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProjectItems.<AddItemAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProjectItems.<>c__DisplayClass4_0.<<AddFromFile>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func`1 asyncMethod, JoinableTaskCreationOptions creationOptions)
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func`1 asyncMethod)
   at Microsoft.VisualStudio.ProjectSystem.ProjectMultiThreadedService.ExecuteSynchronously[T](Func`1 asyncAction)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProjectItems.AddFromFile(String fileName)
   at MadsKristensen.AddAnyFile.ProjectHelpers.AddFileToProject(Project project, FileInfo file, String itemType) in C:\projects\addanyfile\src\Helpers\ProjectHelpers.cs:line 108
   at MadsKristensen.AddAnyFile.AddAnyFilePackage.<MenuItemCallback>d__2.MoveNext() in C:\projects\addanyfile\src\AddAnyFilePackage.cs:line 94

Expected behavior

Include the created file on the C# Shared Project.

File created incorrectly when opened file and selection in Solution Explorer don't match

Installed product versions

  • Visual Studio: 2015 Update 3 Enterprise
  • This extension: 3.5.110

Description

Files are beeing created incorrectly when currently edited file and selection in Solution Explorer are in different projects.

Steps to recreate

  1. Create empty solution
  2. Add C# Class Library project named Library
  3. Add C# Console Application project named Application
  4. Add folder named Folder to Library project
  5. Add file named File1.cs to Library project

File structure should be like

Solution
- Library
  - Folder
    - File1.cs
- Application
  - Program.cs
  1. Open File1.cs in editor
  2. Select Program.cs in Solution Explorer
  3. Move focus back to File1.cs editor
  4. Press [shift]+[f12]
  5. Type File2.cs and press [enter]

Current behavior

  • Add New File dialog shows root path Folder/.
  • File is physicaly created in Library/Folder/File2.cs.
  • File is not added to Library projects.
  • File is added to root folder of Application project as a link.
  • Namespace in created file is Application..Library.Folder

Expected behavior

  • File is created in Library/Folder/File2.cs and is added to Library project. Focus is set on File1.cs so I'd expect to execute actions in this context.
  • Namespace is correcly set as Library.Folder

JSON file encoding should be UTF-8-BOM (for ASP.NET Core Projects)

Installed product versions

  • Visual Studio: 2017 Enterprise
  • This extension: 3.5.129

Description

JSON file encoding should be UTF-8-BOM (for ASP.NET Core Projects).

Current behavior

When adding a JSON file using this extension, I get an ANSI encoded file. Using this file with special characters (äöü) as a configuration file, those characters are not read correctly then. Using Notepad++ to change the encoding of the JSON file to UTF-8-BOM (and manually converting the special characters) fixes the problem.
When adding a JSON file the VS-way (add->new item->json), the encoding of the file is set correctly and there are no problems when reading the configuration.

Expected behavior

Add the JSON file with the UTF-8-BOM encoding.

Git does not consider files as added in VS2015

If extension is used the added file does not picked up by source control in VS2015. In other words these files will never be in repo IF not re-added manually.

Could be VS2015 issue and not the extension's, I'm not sure.

Visual studio crashes when adding file to solution folder

Installed product versions

  • Visual Studio: 2015 Update 3 Enterprise and Community
  • This extension: 3.4.105

Description

Cannot add file to solution folder. Visual studio crashes when user presses [Shift]+[F2] on file in solution folder.

Steps to recreate

  1. Create new solution
  2. Add new solution folder
  3. Select created solution folder in Solution Explorer
  4. Press [Shift]+[F2](nothing happens)
  5. Add any filte to the folder using context menu
  6. Select created file in Solution Explorer
  7. Press [Shift]+[F2]

Current behavior

  • Nothing happens on step 4.
  • Visual Studio crashes on step 7.

Expected behavior

Both step 4 and 7 should open new file dialog and add file to solution folder.

Custom templates

Installed product versions

  • Visual Studio 2015 Enterprise
  • Add New File 3.4.105

Description

Customizations to Visual Studio's template files are ignored by Add New File because it has its own templates.

Steps to recreate

  1. Customize the C# class item template by following these steps
  2. Create a new C# class file using the VS dialog and observe that the changes are present.
  3. Create a new C# class file using Add New File and observe that the changes are not present.

Current behavior

VS item templates are ignored.

Expected behavior

Either VS item templates should be used, or Add New File should provide a means of customizing its templates.

Workarounds

Fork the project, modify the built-in templates, and run a custom build of the extension. Not ideal for obvious reasons.

Doesn't work with Visual F# Power Tools

Installed product versions

  • Visual Studio: [2015 Community]
  • This extension: [3.5.113]

Description

Visual F# Power Tools extension allows me to add folders to F# projects, but when i try to add a new file to a folder using this extension, the file is in the folder on the file system but not in the folder in the project system.

Incorrect behaviour when using "../" to create files in parent/ancestor directories

Installed product versions

  • Visual Studio: 2015 Enterprise Update 3
  • This extension: 3.5.111

Description

Selecting subdirectory A in Solution Explorer, and creating a new file with "../" in its path in order to create it one level up, actually creates a new pseudo-subdirectory node named ".." under subdir A. The file does appear under this node, and appears at the correct level in the filesystem (i.e. the parent of subdir A), but there are two problems:

  1. The ".." node should not be created in Solution Explorer. The file node should simply appear under subdir A's parent node.
  2. If you delete the ".." node in Solution Explorer, you delete everything at the level of subdir A's parent (thank goodness for source control 😄).

The behaviour as described also holds when more than one ../ is used in order to traverse more than one parent directory.

Steps to recreate

  1. Create a new C# console app.
  2. Create a new subdir "foo".
  3. Select "foo" and press Shift-F2.
  4. Enter "../bar.cs" at the prompt.
  5. Observe two nodes created in Solution Explorer: ".." under "foo" and "bar.cs" under "..".
  6. Observe bar.cs created in the same filesystem directory as the project file (same level as "foo").
  7. Delete the ".." node in Solution Explorer.
  8. Observe project directory contents being deleted, with VS sometimes reporting "Error deleting '..': the system call level is not correct".

Current behavior

New ".." node(s) created in Solution Explorer, one for each used in the new file's path.

The Solution Explorer node contains only the newly created file(s), but deleting the node deletes the entire corresponding ancestor directory, with more deeply nested ".." nodes representing successively higher ancestors.

Expected behavior

The new file should appear under the existing node corresponding to the intended ancestor directory, possibly with the restriction that "../" is ignored if it would traverse beyond the project directory.

[Request] Show full path in dialogue window and make it editable

Installed product versions

  • Visual Studio: 2017 Professional Version 15.9.0 Preview 1.0
  • This extension: 3.5.134

Description

Can you add/show the complete path in the new file dialogue
and when possible make it editable

Current behavior

Show only the selected folder
2018-09-10 08_52_58-add new file

Expected behavior

Show complete path, like C:\Git\MySolutions\MyProject\Enumerations\

[Bug] Grey text on grey background (dark theme)

Installed product versions

  • Visual Studio: 2017 Professional Version 15.9.0 Preview 1.0
  • This extension: 3.5.134

Description

When currently open the dialogue window I get this
(I use the dark theme in visual studio)
2018-09-11 08_42_13-add new file

Default file encoding

Installed product versions

  • Visual Studio: 2017 professional
  • This extension: 3.5.129

Description

The default file encoding of UTF-8 is not handled well by a non-Microsoft compiler - it sees the first three characters as an illegal token

Steps to recreate

  1. create a .h file
  2. try to compile with embedded non-Microsoft compiler
  3. get errors

Current behavior

It seems the current UTF-8 encoding is the default, and can't be changed.

Expected behavior

Allow user to select the default encoding. (In this case, I would select ANSI encoding.)

VS crashes when adding file and folder with same name

Installed product versions

  • Visual Studio: 2017 15.7.6
  • This extension: 3.5.129

Description

When i use this Extension Visual Studio crashes when i first add a new file and a new Folder with the same Name as the file.

Steps to recreate

  1. open the new file dialog(Shift+F2)
  2. type "test" to create a new file without extension
  3. open the new file dialog again
  4. type "test/" to create a new Folder with the name test

Current behavior

Visual Studio crashes

Expected behavior

Display an error message box. Visual Studio does the same when i try to do it with --> Add --> New Folder

Templates

This extension is beautiful and should be added into vs 2015 RTM.

I like the templates feature and for .cs files it would be great if it created something more like

using System;

namespace {{DefaultNamespace}}.{{Path}} {
    public class {{FileName}} {
        $
    }
}

I would also make the templating not only on the extension. For example, if the file name starts with a capital I and the second letter is uppercase I will make it an interface

namespace {{DefaultNamespace}}.{{Path}} {
    public interface {{FileName}} {
        $
    }
}

if it's suffix is Controller, like SomeController.cs I would love to see the controller template, and more patterns.

Also some known files like gulp-config or bower.json, config.json all can have a different template not only based on file extension.

Lastly, when/how can one start helping on the templates ? I'm really exciting to see this as the default file new ;)

Namespace in added file is always the default for the project

Installed product versions

  • Visual Studio: 2015
  • This extension: 3.0.82

Description

Consider a project with a default namespace of Foo.
Add a new file in a folder Bar.
The added file has the namespace Foo.

Expected behavior

The namespace should be Foo.Bar.

Uses Spaces for Item Templates

Installed product versions

  • Visual Studio: 2015 Enterprise
  • This extension: Add New File version 3.1.88

Description

Uses Spaces when my IDE is set to use Tabs. A very minor issue but I thought worth reporting.

Steps to recreate

  1. Set IDE to use Tabs. Tools > Options > Text Editor > All Languages (or eg C#) > Tabs > Tab > Size: 4, Indent: 4, Keep Tabs: true.
  2. Insert a new file in a project, eg Test.cs
  3. Notice that it has spaces not tabs

Current behavior

Using spaces for templates always.

Expected behavior

Respect what the IDE is set to for that specific file type.

Thanks for the great extension Mads, I use it every day :)

File creation doesn't respect formatting settings selected by the user

Installed product versions

  • Visual Studio: 2017 Professional
  • AddAnyFile version: 3.5.129

Description

The extension is not following the formatting settings the user has set in the Visual Studio options dialog.

Steps to recreate

  1. Click Shift + F2
  2. Type Class1.cs in the dialog provided.
  3. You should now be able to see the behavior mentioned below.

Current behavior

When I create a new C# file all the opening braces are placed on a new line. Our team places our open braces on the same line as the class/namespace declarations. Our Visual Studio settings are set up to match this. After installing AddAnyFile I noticed that it doesn't respect these Visual Studio settings.

Expected behavior

AddAnyFile should be adhere to the formatting settings the user has selected in the Visual Studio options dialog. When I create a new C# file my opening brace should be on the same line as my class/namespace declaration.

Encoding of added files

Installed product versions

  • Visual Studio: 2015 Community
  • This extension: Add New File, version 3.4.105

Description

Your extension stores newly created files using UTF8 encoding WITHOUT "UTF8 identifier" (see file AddAnyFilePackage.cs, method WriteToDisk, line 159 now). But even if the file uses one of your templates Visual Studio can't correctly recognize the encoding of the file. It thinks it is the default encoding of the OS. When I add some text to the file which has different codes in UTF8 and Default encodings (e.g. "Привет") Visual Studio still saves this file using Default encoding.

It is very annoying then I write .html pages or templates. Browser expects them in UTF8 (I state it in 'meta' tag) but actually encoding is different. And I have to manually re-save all my files in UTF8 encoding.

At the same time when I create a new file using standard Visual Studio means (Solution Explorer ->
context menu -> Add -> New Item) it creates file using UTF8 encoding WITH "UTF8 identifier".

So I'd like to ask you if you can change "false" to "true" in the constructor of UTF8Encoding class in the WriteToDisk method of AddAnyFilePackage.cs (line 159 now). What do you think about it?

Steps to recreate

  1. Add a new file using your extension (e.g. .html file)
  2. Add some text which will be saved using different codes in UTF8 and Default encodings (e.g. "Привет").
  3. Save the file in Visual Studio.
  4. The file is saved in Default encoding, not in UTF8.

P.S.

Thank you for great extensions!

Use `public` in templates

Most of the times the created types are intended to be public so why not just put it in the templates? I find myself always doing this right after I add the file.

Shift-F2 does not work if you use the new 'Open Folder' feature

Installed product versions

Microsoft Visual Studio Enterprise 2017 RC
Version 15.0.26014.0 D15REL
Microsoft .NET Framework
Version 4.7.02017

Add New File - Version: 3.5.127

Description

Shift-F2 does not work if you use the new 'Open Folder' feature

Steps to recreate

  1. Create a folder with a file
  2. File / Open / Folder / (select the folder you just created)
  3. Press Shift+F2

Current behavior

The 'Add New File' Dialog box does NOT pop-up

Expected behavior

Cool new dialog box.

Mitigation / Work Around

It looks like you can activate the extension by right clicking in the Solution Explorer window and clicking Add

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.