Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Add new file failed from Solution Explorer. #500

Closed
Tracked by #492
alfadb opened this issue Sep 9, 2023 · 19 comments
Closed
Tracked by #492

[BUG] Add new file failed from Solution Explorer. #500

alfadb opened this issue Sep 9, 2023 · 19 comments
Assignees
Labels
area-templates Experiences around the project/item templates bug Something isn't working fixed triaged The issue has been triaged
Milestone

Comments

@alfadb
Copy link

alfadb commented Sep 9, 2023

Describe the Issue

When I create a new class from solution explorer, I got a error.

Steps To Reproduce

  1. Add new Class from Solution Explorer:
  • 1694267750870
  • 1694267781078
  1. Get Error:
    image
Error running command csdevkit.addNewFile: Failed with ExitCode(103)
Details
No templates or subcommands found matching: 'class'.
Did you mean one of the following templates?
   dotnet new classlib
Did you mean one of the following subcommands?
   dotnet new list

To list installed templates similar to 'class', run:
   dotnet new list class
To search for the templates on NuGet.org, run:
   dotnet new search class


For details on the exit code, refer to https://aka.ms/templating-exit-codes#103
. This is likely caused by the extension that contributes csdevkit.addNewFile.

Expected Behavior

No response

Environment Information

  • Windows 11 + RemoteSSH to Archlinux
  • VSCode Version: 1.82.0
  • Extension Version: v0.4.10 (Last released 2023-9-8, 02:12:19)
@alfadb alfadb added the bug Something isn't working label Sep 9, 2023
@microsoft-issue-labeler microsoft-issue-labeler bot added the area-templates Experiences around the project/item templates label Sep 9, 2023
@smitpatel smitpatel self-assigned this Sep 11, 2023
@smitpatel smitpatel added the triaged The issue has been triaged label Sep 11, 2023
@smitpatel
Copy link

This has been fixed in next release. Should be available in 0.5.*

@alfadb
Copy link
Author

alfadb commented Sep 12, 2023

This has been fixed in next release. Should be available in 0.5.*

Ok, Thanks.

@HUNZALAMUSHTAQ
Copy link

Error running command csdevkit.addNewFile: Failed with ExitCode(6) Details No templates found matching: 'class'. To list installed templates, run: dotnet new --list To search for the templates on NuGet.org, run: dotnet new class --search . This is likely caused by the extension that contributes csdevkit.addNewFile.

Still getting this issue in VS Code
C# dev kit version: v1.0.14

@simon125
Copy link

simon125 commented Dec 6, 2023

Same here, I'm still getting the same error when I'm trying to create new file (Class etc)

Environment Information
Ubuntu 20.04.5 LTS
VSCode Version: 1.84.2
Extension Version: .NET Extension Pack v1.0.13

@theekshanak
Copy link

Same here, I'm getting the same error when I try to create a new file using Solution Explorer

Environment Information
macOS Sonoma : 14.1.2 (23B92)
VSCode version: 1.85.1 (Universal)
Extension Version: v1.1.16

@yoav-melamed
Copy link

I'm also having the same issue.

Environment
macOS Sonoma : 14.1.2
Apple M2 Pro ARM64
VSCode version: 1.85.1
Extension Version: v1.1.16

@smikelson75
Copy link

I'm having the same issue when I utilize the WSL Ubuntu 20.04 but everything works just fine when I use the C# Dev Kit natively on Windows. Please fix the WSL Ubuntu.

Environment
Windows 11 running Ubuntu 20.04.6 LTS via WSL
VSCode: 1.85.1
Extension version: 1.2.5 (Pre-release) or 1.2.4

@zhangr4
Copy link

zhangr4 commented Dec 31, 2023

I also have the same issue here.

Environment:
Windows 11
VSCode: 1.85.1
Extension version(C# Dev Kit): v1.1.16

@ErikSvaleng
Copy link

ErikSvaleng commented Jan 8, 2024

I also have the same issue here.

Environment: Windows 11 VSCode: 1.85.1 Extension version(C# Dev Kit): v1.1.16

Same setup, same issue. Also same issue when I switch to the Pre-Release version. Creating folders works just fine

@brandochn
Copy link

I'm having the same issue

Environment:
Windows 10 running Ubuntu 22.04.3 LTS via WSL2
VSCode: 1.85.1
Extension version: 1.2.7

@smitpatel smitpatel added this to the Mar2024 milestone Jan 17, 2024
@smitpatel
Copy link

Reopening the ticket. While we fixed this when using 7.0 SDK, the error code in earlier SDK was different giving rise to error.

@smitpatel smitpatel reopened this Jan 17, 2024
@ErikSvaleng
Copy link

Same setup, same issue. Also same issue when I switch to the Pre-Release version. Creating folders works just fine

With C# Dev kit now at v.1.2.7, I no longer get this error.

@uhback
Copy link

uhback commented Jan 27, 2024

I'm still having the same issue:

Error running command csdevkit.addNewFile: Failed with ExitCode(6) Details No templates found matching: 'class'. To list installed templates, run: dotnet new --list To search for the templates on NuGet.org, run: dotnet new class --search . This is likely caused by the extension that contributes csdevkit.addNewFile.

Environment:

  • MacOS: 13.1
  • VSCode version: 1.85.2
  • C# Extension version: 2.15.30
  • C# Dev Kit Extension version: 1.2.7

@Ludogo
Copy link

Ludogo commented Jan 29, 2024

i had the same issue using linux Ubuntu

  • Code : 1.85.2
  • C# : 2.15.30
  • C# Dev Kit : 1.2.7
  • Intellicode for C# Dev Kit 0.1.26

I was able to solve it by :
dotnet new --install Vio.Dotnet.Templates

@jnomikos
Copy link

jnomikos commented Feb 4, 2024

dotnet new --install Vio.Dotnet.Templates

This fixed the issue for me as well

@majew7
Copy link

majew7 commented Feb 6, 2024

Yes, as a workaround, this worked for me too: dotnet new --install Vio.Dotnet.Templates.

Then using "Add New File..." menus worked.

Context
VSCode: 1.86.0
C#: 2.15.30
C# Dev Kit: 1.3.10

@kvenkatrajan kvenkatrajan modified the milestones: Mar2024, Apr2024 Feb 14, 2024
@RodrigoooSC
Copy link

RodrigoooSC commented Mar 15, 2024

Funcionou para mim também: dotnet new --install Vio.Dotnet.Templates.

VSCode: 1.87.1
C#: 2.22.3
Kit de desenvolvimento C#: 1.4.29

@liupeng5843
Copy link

dotnet new --install Vio.Dotnet.Templates is work for macos

@smitpatel smitpatel modified the milestones: Apr2024, May2024 Mar 26, 2024
@smitpatel smitpatel modified the milestones: May2024, June2024 May 2, 2024
@smitpatel smitpatel modified the milestones: June2024, July2024 Jun 14, 2024
@smitpatel smitpatel modified the milestones: July2024, Aug2024 Jul 10, 2024
@smitpatel
Copy link

Fixed in version 1.9.55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-templates Experiences around the project/item templates bug Something isn't working fixed triaged The issue has been triaged
Projects
None yet
Development

No branches or pull requests