1.环境
开发:VS2015
平台:window 7
2.解决方案级别结构
创建一个ASP.NET 5 Template Empty项目:
src:存放项目(projects)
global.json:全局配置
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-rc1-update1",
}}
可以通过F12查看Json的定义(http://json-schema.org/draft-04/schema#):
{
"title": "JSON schema for the ASP.NET global configuration files",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": true,
"required": [ "projects" ],
"properties": {
"projects": {
"type": "array",
"description": "A list of project folders relative to this file.",
"items": {
"type": "string"
}
},
"packages": {
"type": "string",
"description": "The location to store packages"
},
"sdk": {
"type": "object",
"description": "Specify information about the SDK.",
"properties": {
"version": {
"type": "string",
"description": "The version of the SDK to use."
},
"architecture": {
"enum": [ "x64", "x86" ],
"description": "Specify which processor architecture to target."
},
"runtime": {
"enum": [ "clr", "coreclr" ],
"description": "Chose which runtime to target."
}
}
}
}
}
projects:A list of project folders relative to this file.
-
sdk:Specify information about the SDK.
sdk.version:The version of the SDK to use.
sdk.architecture:Specify which processor architecture to target.
sdk.runtime:Chose which runtime to target.
packages:The location to store packages
3.项目级别结构
Properties/launchSettings.json (仅 Windows 平台有)
wwwroot:wwwroot就是运行时网站的根目录(可以在 project.json 内重置)
wwwroot\web.config
project.json:(项目核心配置文件,项目依赖、工具、构建选项、运行时选项、发布选项等)
project.lock.json (运行过 dnu restore 生成)
Dockerfile (Windows 平台没有)
{your-project-name}.xproj (仅 Windows 平台有)
Startup.cs