您可以在终端(VS Code 或任何终端编写)上使用 Yeoman:
yo aspnet
然后你选择你需要创建什么,我假设你已经安装了 Core 和 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
创建 web 应用程序 test_web 后,您需要执行:
cd test_web
dotnet restore
dotnet run
要从 VS Code 运行,您只需打开文件夹 test_web。调试器识别 .Net 项目,然后您只需按 F5 即可从 VS Code 运行。
如果没有安装 yeoman:
npm install -g yo bower
web reference
您需要 NodeJs 才能使用 yeoman 和 npm。
无论如何,您都可以选择在 Ubuntu 中使用 monoDevelop。
我对其进行了测试,它在 Ubuntu 上为我工作。