I am trying to look out for creating C# Project in Visual Studio Code with .csproj extension but unable to find anything relevant for the same. Please share the helpful with prerequisites for the same.
Asked
Active
Viewed 1,313 times
0
-
I think you're asking how to create a C# project file programmatically, in which case try this: http://stackoverflow.com/questions/8790528/create-a-visual-studio-project-programmatically. If that's not right then please comment back – LordWilmore Feb 23 '17 at 12:51
1 Answers
0
you can use Yeoman on Terminal (of VS Code or any terminal write):
yo aspnet
then you choice what you need to create, I assume you have installed Core and Yoeman:
What type of application do you want to create? (Use arrow keys)
❯ Empty Web Application
Empty Web Application (F#)
Console Application
Console Application (F#)
Web Application
Web Application Basic [without Membership and Authorization]
Web Application Basic [without Membership and Authorization] (F#)
(Move up and down to reveal more choices)
If you want to create Web application choose it and press ENTER answer the name you wish (test_web my example) and then push ENTER:
create test_web/.gitignore
create test_web/Program.fs
create test_web/Startup.fs
create test_web/test_web.fsproj
create test_web/web.config
create test_web/Properties/launchSettings.json
create test_web/README.md
create test_web/runtimeconfig.template.json
create test_web/global.json
after to create the web application test_web you need execute:
cd test_web
dotnet restore
dotnet run
To run from VS Code, you only have to open the folder test_web. Debugger is recognize .Net projects then you only push F5 to run from VS Code.
To install yeoman if you dont have:
npm install -g yo bower
you need NodeJs to use yeoman and npm.
anyway you have option to use monoDevelop in Ubuntu.
I tested it and it is working on Ubuntu for me.

Dave
- 7,028
- 11
- 35
- 58