运行第一个.net core程序
前置条件 ubuntu已安装.net core运行环境
分6步
mkdir netcore 创建一个项目文件夹
cd netcore 进入该文件夹
dotnet new new命令 用于创建一个新的控制台应用程序
dotnet restore 分析 project.json 文件, 下载依赖并返回结果
dotnet build 编译项目
dotnet run 运行项目
root@ubuntu:~/firstnetcore# mkdir netcore
root@ubuntu:~/firstnetcore# cd netcore
root@ubuntu:~/firstnetcore/netcore# dotnet new
Created new C# project in /root/firstnetcore/netcore.
root@ubuntu:~/firstnetcore/netcore# ls
Program.cs project.json
root@ubuntu:~/firstnetcore/netcore# dotnet restore
log : Restoring packages for /root/firstnetcore/netcore/project.json...
log : Writing lock file to disk. Path: /root/firstnetcore/netcore/project.lock.json
log : /root/firstnetcore/netcore/project.json
log : Restore completed in 2336ms.
root@ubuntu:~/firstnetcore/netcore# dotnet build
Project netcore (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling netcore for .NETCoreApp,Version=v1.0
Compilation succeeded.
0 Warning(s)
0 Error(s)
Time elapsed 00:00:00.8093903
root@ubuntu:~/firstnetcore/netcore# dotnet run
Project netcore (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
Hello World!
root@ubuntu:~/firstnetcore/netcore#

运行效果
运行第一个.net core程序的更多相关文章
- iOS 11开发教程(三)运行第一个iOS 11程序
iOS 11开发教程(三)运行第一个iOS 11程序 运行iOS11程序 创建好项目之后,就可以运行这个项目中的程序了.单击运行按钮,如果程序没有任何问题的话,会看到如图1.6和1.7的运行效果. 图 ...
- .NET Core初体验 - 在Mac下运行第一个Web示例程序
要说最近两天程序猿之间最喜欢吹水的事是什么?那绝壁是甲骨文要放弃Java!简直做梦都要笑醒!由于公司的产品线全面转向Java,最近几个月也一直在苦学Java技术.已经默默决定了,如果消息证实是真的,我 ...
- ubuntu下运行第一个.net core web程序
前置条件 ubuntu系统 且已经安装dotnetcore运行环境 mkdir testMVC 创建一个文件夹 cd testMVC 进入文件夹 dotnet new -t web 创建程序( ...
- 3)创建,测试,发布 第一个NET CORE程序
工具:Visual Studio Code 或者 Visual Studio 环境:.NET CORE 2.0 VS Code很强大 当然支持netcore的开发,但是我还是选择更熟悉更强大的VS. ...
- 运行第一个Node.js程序
初学Node.js,萌新一枚.感觉Node.js挺不错的,从基础开始一步一步来,加油吧! 我们来使用Node.js的express来运行第一个程序helloworld: 在命令提示符键入express ...
- 搞清楚ourhdr.h是什么及运行第一个UNIX C程序
好多人开始学:UNIX 环境高级编程这本书时:看到书里面说的头文件ourhdr.h而找不到她在哪里:而且无法开始继续学习:其实这个就是系统的内核标准头文件: 而她的位置在:/usr/include/u ...
- 将Windows系统编译的.NET Core程序发布到Ubuntu系统
在可移植方面.NET Core应用程序分为两种,Portable application(便捷,需要目标机器安装.NET Core Runtime)和Self-contained applicatio ...
- 手把手教你用Jenkins自动发布dotnet core程序
Jenkins部分 首先,我们要有个Jenkins咯,下载链接:https://jenkins.io/download/ 我们安装官网教程安装好jenkins,安装教程略.... 嗯?不是说好手把手么 ...
- 使用Jexus服务器运行Asp.Net Core2.0程序
前段时间写了篇关于.net core跨平台部署的文章.https://my.oschina.net/lichaoqiang/blog/1861977 主要讲述了,利用Nginx+CentOS+Supe ...
随机推荐
- Problem D: 结构体:计算输入日期是该年的第几天
#include <stdio.h> struct time{ int year; int month; int day;}; int main(void) { struct time s ...
- Codeforces Round #344 (Div. 2) D. Messenger kmp
D. Messenger 题目连接: http://www.codeforces.com/contest/631/problem/D Description Each employee of the ...
- .Net 有关程序集查找与加载的一点反思
最近在做一款叫VICA产品,此产品采用了插件机制,插件在运行中加载,插件与插件之间存在依赖关系,所有的插件DLL为方便管理都放置在Plugins的文件夹下统一管理.这种处理方式不自觉的就让我想了解cl ...
- [Android Pro] StorageManager简介
StorageManager StorageManager is the interface to the systems storage service. The storage manager h ...
- tez是什么?
[Apache Tez是什么?] http://dongxicheng.org/mapreduce-nextgen/apache-tez/ 浅谈Apache Tez中的优化技术 http://dong ...
- python wheel 包命名规则和 abi 兼容
wheel 包的命名规定 wheel 包的命名格式为 {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform ...
- Parallax Occlusion Mapping in GLSL [转]
http://www.sunandblackcat.com/tipFullView.php?topicid=28 This lesson shows how to implement differ ...
- [Android Pro] service中显示一个dialog 或者通过windowmanage显示view
转载: http://blog.csdn.net/huxueyan521/article/details/8954844 通过windowmananger来在窗口上添加view的时候,需要设置aler ...
- Tomcat 没有自动解压webapp下的war项目文件问题
默认选择的tomcat安装在了C盘下的C:\Program Files下 所以webapp文件也在C盘下 选择启动tomcat时 我选择了 bin下的 Tomcat.exe 显示成功启动 打开项目网站 ...
- C# 深入理解堆栈、堆在内存中的实现
尽管在.NET framework下我们并不需要担心内存管理和垃圾回收(GarbageCollection),但是我们还是应该了解它们,以优化我们的应用程序.同时,还需要具备一些基础的内存管理工作机制 ...