Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Add mdoc #5

Merged
merged 10 commits into from
Feb 28, 2018
Merged

Add mdoc #5

merged 10 commits into from
Feb 28, 2018

Conversation

mattleibow
Copy link
Contributor

@mattleibow mattleibow commented Feb 23, 2018

Building the project will automatically run mdoc to generate the docs.

Once the project is compiled, a task can be run to take all the output assemblies and update the docs:

msbuild /t:MDocUpdateDocs /p:Cnfiguration=Release

This is for the #16 issue.

An example case of using everything could be this:

  1. Write some nice new API
  2. Build the solution (msbuild /p:Configuration=Release)
  3. Update the docs (msbuild /t:MDocUpdateDocs /p:Cnfiguration=Release)
  4. Submit PR

NOTE: The UpdateDocsWithMDoc task is best run on Windows as the UWP library has to be processed. However, if this is run on macOS, then an assembly element will be missing from the ./docs/en/index.xml file. Be careful not to commit this.

This runs during the package phase.
============================================================
-->
<Target Name="AddMDocFilesToPackage" BeforeTargets="_GetBuildOutputFilesWithTfm" DependsOnTargets="SetupMDoc">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not depend on GenerateDocsWithMDoc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No as they are separate steps.

GenerateDocsWithMDoc runs as part of the core compilation of the individual assemblies. AddMDocFilesToPackage is a special task that is run when the .nuspec is being created. If there is a dependency, then it will fail as the Pack task does not actually start the compile.

@mattleibow
Copy link
Contributor Author

mattleibow commented Feb 24, 2018

An interesting thing happens on mac... After running the UpdateDocsWithMDoc task, it fails with an error saying that it couldn't find that task that it just ran...

Not sure why, but since the job has already run, it should be safe to ignore.

Build started 2018/02/24 10:04:58 PM.
Project "/Users/matthew/Projects/f50/Caboodle.sln" on node 1 (UpdateDocsWithMDoc target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Any CPU".
Project "/Users/matthew/Projects/f50/Caboodle.sln" (1) is building "/Users/matthew/Projects/f50/Caboodle/Caboodle.csproj" (2) on node 1 (UpdateDocsWithMDoc target(s)).
UpdateDocsWithMDoc:
  mono "/Users/matthew/.nuget/packages/mdoc/5.5.0/tools/mdoc.exe" ...
  Members Added: 0, Members Deleted: 0
Done Building Project "/Users/matthew/Projects/f50/Caboodle/Caboodle.csproj" (UpdateDocsWithMDoc target(s)).
Project "/Users/matthew/Projects/f50/Caboodle.sln" (1) is building "/Users/matthew/Projects/f50/Caboodle.Tests/Caboodle.Tests.csproj" (3) on node 1 (UpdateDocsWithMDoc target(s)).
/Users/matthew/Projects/f50/Caboodle.Tests/Caboodle.Tests.csproj : error MSB4057: The target "UpdateDocsWithMDoc" does not exist in the project.
Done Building Project "/Users/matthew/Projects/f50/Caboodle.Tests/Caboodle.Tests.csproj" (UpdateDocsWithMDoc target(s)) -- FAILED.
Done Building Project "/Users/matthew/Projects/f50/Caboodle.sln" (UpdateDocsWithMDoc target(s)) -- FAILED.

Build FAILED.

https://gist.github.com/mattleibow/0942417c7b8aebadfb9e7184eba9a562

@mattleibow mattleibow added this to the Preview-1 milestone Feb 27, 2018
@mattleibow
Copy link
Contributor Author

build

@jamesmontemagno jamesmontemagno merged commit c1914ad into master Feb 28, 2018
@mattleibow mattleibow deleted the add-mdoc branch February 28, 2018 19:07
@mattleibow
Copy link
Contributor Author

Closes #16

@mattleibow mattleibow mentioned this pull request Feb 28, 2018
@mattleibow mattleibow added this to Done in v0.5.0-preview Mar 28, 2018
Redth pushed a commit that referenced this pull request Aug 6, 2020
mattleibow pushed a commit that referenced this pull request Nov 11, 2020
Merge xamarin:main into dimonovdd:main
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants