website
website copied to clipboard
Automation to make examples show pinned addin / tools directives
We get complaints from time to time from users which looked at XML code examples and copy/pasted the example into their buildscript without reading about the suggestion to pin addin and tool versions.
Some automated process would be nice to have examples always showing usage with latest version of the addin / tool. This would require to patch all documentation XML files before generating the API documentation and search for #addin
and #tool
usage there and replace it with the actual version of the specific addin or tool.
There are some points to consider though:
- An addin can contain
#addin
and#tool
directives referencing a different NuGet package. Resolving needs to also work in this case. - Examples don't necessary will work with latest version of a tool. In this case example should anyway mention specific version.
Extension page in the meantime shows how to add an addin to the different runners pinned to latest version (see e.g. https://cakebuild.net/extensions/cake-7zip/). We should therefore discourage repeating this information in XML comments in best practices.