zoukankan      html  css  js  c++  java
  • # asp.net core 1.0 项目结构

    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."
    
     }
    
     }
    
     }
    
     }
    
    }
    
    
    1. projects:A list of project folders relative to this file.

    2. 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.

    3. packages:The location to store packages

    3.项目级别结构

    Properties/launchSettings.json (仅 Windows 平台有)

    wwwroot:wwwroot就是运行时网站的根目录(可以在 project.json 内重置)

    wwwrootweb.config

    project.json:(项目核心配置文件,项目依赖、工具、构建选项、运行时选项、发布选项等)

    project.lock.json (运行过 dnu restore 生成)

    Dockerfile (Windows 平台没有)

    {your-project-name}.xproj (仅 Windows 平台有)

    Startup.cs

  • 相关阅读:
    TypeError: Object(…) is not a function
    解决 OSError: [WinError 126] 找不到指定的模块
    LeetCode——和等于 k 的最长子数组长度
    LeetCode——判断子序列
    LeetCode——递增的三元子序列
    LeetCode——字符串相乘
    LeetCode——课程安排 IV
    LeetCode——最小移动次数使数组元素相等
    同源时钟、同相位时钟、同时钟域
    C++ 创建动态二维数组 使用vect<vec> 并初始化为0
  • 原文地址:https://www.cnblogs.com/pengzhen/p/5753526.html
Copyright © 2011-2022 走看看