2017-02-23 84 views
0

我想在Visual Studio代码中用.csproj扩展名创建C#项目,但无法找到与之相关的任何内容。 请分享同样的先决条件的帮助。如何在Visual Studio代码中使用.csproj扩展名创建C#项目?

+0

我想你是问如何以编程方式创建一个C#项目文件,在这种情况下试试这个:http://stackoverflow.com/questions/8790528/create-a-visual-studio-project-programmatically。如果这不正确,请回复评论 – LordWilmore

回答

0

你可以在终端使用约曼(VS代码或任何终端写的):

yo aspnet 

,那么你的选择,你需要创造什么,我假设你已经安装了核心和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) 

如果你想创建Web应用程序选择它,然后按ENTER键回答你希望(我test_web例如)的名称,然后按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 

后创建test_web你需要执行的Web应用程序:

cd test_web 
dotnet restore 
dotnet run 

从VS代码运行,你只需要打开文件夹test_web。调试器识别.Net项目,然后您只需按F5从VS代码运行。

,如果你不安装自耕农有:

npm install -g yo bower 

web reference

你需要NodeJs使用自耕农和故宫。

无论如何,你可以选择在Ubuntu中使用monoDevelop。

我测试了它,它在Ubuntu上为我工作。

相关问题