Call exe in nuget package while accessing mscorlib.xml
The System.IO.Abstractions is a C# repository that uses the <inheritdoc /> tag to link to System.IO documentation. Unfortunately to make this documentation available in the System.IO.Abstraction nuget package the xml documentation files needs to be modified at the before_package stage in the appveyor deployment.
The inheritdoc nuget package provides an exe tool that does this modification, but I'm unsure where to find or how to access this tool as part of the appveyor deployment. On my local machine this exe is found for .NET standard/core here:
\Users\<your user name>\.nuget\packages\inheritdoc\1.2.0.1\tools\InheritDoc.exe
but it also takes in a set of parameters that are paths to other files, such as the project directory to search for the xml files to change, and the paths to the System.IO xml documentation files.
How would I run this exe from the appveyor.xml if it looks like this on my local machine:
\Users\<user name>\.nuget\packages\inheritdoc\1.2.0.1\tools\InheritDoc.exe -b '\path\to\project\directory\' -g 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\mscorlib.xml' -o
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Owen McDonnell on 29 Jul, 2018 06:26 AM
From what i can see, provided the inheritdoc package is installed, the only modifications needed in that command is
path\to\project\directory, which you should be able to swap out with%APPVEYOR_BUILD_FOLDER%environment variable, and<user name>in first parameter should beappveyor.Give it a try and let us know if any troubleshooting is needed.
2 Posted by robert on 29 Jul, 2018 08:07 PM
I added this line the the appveyor.yml:
but it produced the following error:
I believe the
C:\projects\system-io-abstractions\is the clone/build directory, but unsure why the environment variable has been appended.Support Staff 3 Posted by Owen McDonnell on 30 Jul, 2018 04:17 AM
Can you please share your yaml file or go to Export Yaml tab if you are using UI for configuration.
4 Posted by robert on 30 Jul, 2018 05:57 AM
Here it is: System.IO.Abstractions/appveyor.yml
Support Staff 5 Posted by Owen McDonnell on 31 Jul, 2018 03:55 AM
%APPVEYOR_BUILD_FOLDER%is cmd syntax. For powershell, use$env:APPVEYOR_BUILD_FOLDER6 Posted by robert on 31 Jul, 2018 08:48 AM
Thanks for the syntax correction, I changed the yml file to use the powershell syntax style with this environment variable but it kept the
$env:APPVEYOR_BUILD_FOLDERrather than switching it for the path of the build directory. Does it require something else to tell it that its an environment variable?The build log can be found here: ci.appveyor.com
7 Posted by Ilya Finkelshte... on 31 Jul, 2018 12:14 PM
In PowerShell variables are not being resolved if they wrapped on single quotas (
'). SoInheritDoc.exeis fed with literally-b $env:APPVEYOR_BUILD_FOLDER.You do not need to wrap
$env:APPVEYOR_BUILD_FOLDERin quotas at all, but if you wish, use double quotas (").Also nuget package is being created as part of build stage. So if you need this command to be executed before, run it as
before_build.8 Posted by robert on 03 Aug, 2018 10:59 AM
Thanks, that got it working, except the script call only worked in
before_package. However, it has been recommended that the InheritDoc nuget package only be used temporarily as part of the appveyor script and neither installed nor deployed with System.IO.Abstractions.Is it possible to temporarily install a nuget package? Maybe using the Powershell Install-Package cmdlet? Does appveyor already have the nuget packageprovider installed, and does the InheritDoc nuget package need to be uninstalled after the fact (using Uninstall-Package)?
Support Staff 9 Posted by Owen McDonnell on 03 Aug, 2018 04:22 PM
Sure, using nuget cli will avoid adding any reference of the package to your project.
So something like
- ps: nuget install InheritDoc -Version 1.2.0.1should work.No need to uninstall since build VM's are transient and destroyed after the build anyway.
10 Posted by robert on 13 Aug, 2018 06:46 AM
Hopefully this is the final part of getting this change in place. I'm trying to put the duplicated components into environment variables:
I managed to get it working for thenugetcall:but I've had no luck running the following call:
I get the following error:
How do I go about fixing this?
If it helps, the full yaml file can be found here, and the log file here.
Support Staff 11 Posted by Owen McDonnell on 13 Aug, 2018 03:31 PM
Try putting the call operator (&) in front of the problematic line. Like so,
Support Staff 12 Posted by Owen McDonnell on 13 Aug, 2018 05:04 PM
Sorry, you should also wrap the whole command in single quotes.
Ilya Finkelshteyn closed this discussion on 13 Oct, 2018 09:00 PM.