bard83 / csharpextensions

C# Extensions for Visual Studio Code
MIT License
2 stars 1 forks source link

When creating files through the Command Pallete files dont respect current directory or namespace #26

Open eviathan opened 3 months ago

eviathan commented 3 months ago

Describe the bug

  1. Press CMD+Shift+P (ctrl+shift+p windows?) to bring up the command pallete.
  2. Type in Class to bring up Class creation command
  3. Select it and hit enter to bring up file name dialog
  4. Enter file Name and Hit Enter

Expected Behaviour

  1. File is created in the same folder as currently open/ selected file
  2. Namespace is configured accordingly

Actual Behaviour

  1. File is created at project root directory
  2. Namespace is completely unset

Context Extension Version: v1.7.3 VSCode Version: 1.90.0 OS Version: MacOS Sonoma 14.2.1

Screenshot 2024-06-10 at 14 06 24
eviathan commented 3 months ago

A few things noticed whilst investigating this:

  1. A misspelling on this function in extension.ts: GetKnonwCommands. Should be GetKnownCommands
  2. Assuming the problem is in _getIncomingPath in the Extension singleton.