【问题标题】:Folder structure in corefx projectscorefx 项目中的文件夹结构
【发布时间】:2015-12-05 20:10:06
【问题描述】:

我正在尝试了解 corefx 项目的文件夹结构,此处为 System.IO。这是 System.IO 文件夹在 OS X 中的显示方式

System.IO BLACKSTAR$ pwd
/Users/BLACKSTAR/dotnet/corefx/src/System.IO
sameer:System.IO BLACKSTAR$ tree
.
├── System.IO.sln
├── ref
│   ├── System.IO.Manual.cs
│   ├── System.IO.cs
│   ├── System.IO.csproj
│   ├── bin
│   │   └── Debug
│   │       └── dotnet
│   │           ├── ref.dll
│   │           └── ref.xml
│   ├── project.json
│   └── project.lock.json
├── src
│   ├── Resources
│   │   └── Strings.resx
│   ├── System
│   │   └── IO
│   │       └── InvalidDataException.cs
│   ├── System.IO.csproj
│   ├── project.json
│   └── project.lock.json

这就是我想要弄清楚的

  1. ref 文件夹中有什么?
  2. src 文件夹中有什么?
  3. ref和src有什么联系?
  4. Ref 面向 dotnet,但 Src 面向 dnxcore50 框架。这意味着什么?
  5. 我能够在 ref 文件夹中构建项目,但我无法使用 dnu build 在 src 中构建项目,尽管 dnu restore 运行成功。我做错了什么?
sameer:System.IO BLACKSTAR$ dnvm list

Active Version              Runtime Architecture OperatingSystem Alias
------ -------              ------- ------------ --------------- -----
       1.0.0-beta7          coreclr x64          darwin          
  *    1.0.0-beta7          mono                 linux/osx       default

sameer:System.IO BLACKSTAR$

【问题讨论】:

    标签: mono dnx .net-core dnu


    【解决方案1】:

    您在这里看到的是一个命名空间的 NuGet 包,它实际上是 CLR 的一部分。有些类型很早就需要了……像文件 io 和基本数据类型,所以它们是 CLR 发行版的一部分。您可以在核心 CLR github 项目中找到这些。

    所以...

    1. Ref 是设计时的空实现。它们用于定义类型。
    2. SRC 是基于 dnxcore5 的实现...本质上是空的。
    3. Ref 与 SRC.... Ref 用于查找类型...与实现的绑定(在 coreclr 或 mscorlib 中)由某些 PCL 类型转发完成。
    4. SRC 是 coreclr 的伪实现。也许只是缺少的类型。 Ref 以 dotnet 为目标,因为所有现代 SDK 都具有 System.IO 的类型转发。
    5. 我不知道它们是如何构建的。

    抱歉,缺少详细信息。 MS 没有很好地记录它。

    【讨论】:

      猜你喜欢
      • 2014-07-09
      • 2018-03-11
      • 2020-09-11
      • 1970-01-01
      • 2011-07-07
      • 1970-01-01
      • 2011-01-31
      • 2016-08-05
      • 1970-01-01
      相关资源
      最近更新 更多