Missing Launch.json Auto-Creation for dotnetcore classlib template
See original GitHub issueEnvironment data
dotnet --info
output:
.NETCore SDK version 2.1.400
VSCode version 1.29.1 (latest in time of writing this)
CsharpExtension version 1.17.1
OS Windows x64
Steps to reproduce
All the problem is creating, building and debugging the dot net core class library.
Expected behavior
when I create a Console project using this command : dotnet new console -o A1
, the C# extension automatically create bin folder and ask me :
required assets to build and debug are missing from Console, Add them ?
.
and after clicking yes, the extension creates and configured launch.json and task.json for me :
and after pressing F5 , it compiles and builds successfully. But …
Actual behavior
But when I create class library using this command : dotnet new classlib -o A1
the extension does NOT show me any notification that ask me if I would like to add assets or not
I mean the extension does NOT create Launch.json and Task.json for me and clearly does not configure them.
.
When I press F5 the command palette asks me to select my environment and I click on .Net Core
Then it generates Launch.json for me BUT Wrongly and when I press F5 to build it , I get this Error :
Could not find the task ‘build’
this is too annoying to have this behavior in this rich text editor and extension. Thank you for your good Extension 🥇
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
OMFG why so much overhead and problems to have a simple extension work! What a waste of time! It’s just easier to launch VS17/19 and test code in a new file or use dotnetfiddle.net to run quick code tests. I was under the impression that VSCode extensions was supposed to be light weight and quick!
Thumbs down…
Thank you, I know the scenario is generic but I think it would be a good idea to have a default behavior for building the library. any way , I write my Launch.json and Task.json here for those who have my problem because I was searching in google for hours and I did not come up with solution in the net. thanks again 👍
My Launch.json configuration for building my class library with F5
My Task.json configuration for building my class library with F5.