Skip to content

[preview] mdoc v5.0.0.5

Pre-release
Pre-release
Compare
Choose a tag to compare
@joelmartinez joelmartinez released this 02 Mar 04:25

A big overhaul of "frameworks mode". In addition to the features below, all frameworks now use their own AssemblyResolver, so memory and number of open file handles are greatly reduced.

Frameworks Configuration File

Frameworks mode now requires an XML configuration file.

mdoc update -o out/path -fx path/to/frameworks/frameworks.xml

sample configuration file:

<?xml version="1.0" encoding="utf-8"?>
<Frameworks>
  <Framework Name="One" Source="One">
    <assemblySearchPath>dependencies/One</assemblySearchPath>
  </Framework>
  <Framework Name="Two" Source="Two">
    <assemblySearchPath>dependencies/Two</assemblySearchPath>
  </Framework>
</Frameworks>

Note that the assemblySearchPath is meant to house dependent assemblies that mono.cecil must be able to resolve. You can have as many as you need for each framework if you happen to have them separated into multiple folders. Also the -L parameter applies globally to every framework.

Frameworks Config Bootstrap

To simplify the tedium of creating the configuration file, a simple command was added that will use the folder structure to create a basic configuration file:

mdoc fx-bootstrap path/to/frameworks

This will create a file at path/to/frameworks/frameworks.xml

DocId Signatures

You can now pass a flag to add a DocId signature to every Type and Member node.

mdoc update -o out/path some.dll -use-docid

please note: framework index files will always use the DocId as their identifiers as of this release.

Frameworks Index files Grouped by Namespace

Framework index files now have types grouped by namespace. Example:

<?xml version="1.0" encoding="utf-8"?>
<Framework Name="Two">
  <Namespace Name="MyFramework.MyOtherNamespace">
    <Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
      <Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />
      ...
    </Type>
  </Namespace>
</Framework>