This project has moved. For the latest updates, please go here.

Add file to a conceptual article

Topics: Developer Forum, Project Management Forum, User Forum
Oct 13, 2014 at 1:58 PM
Hi guys,

is it possible to embed a file in the sandcastle project, which file I can link from an article for the users to download?
Oct 13, 2014 at 3:13 PM
Adding it to the project with a BuildAction of Content should work. If you're asking about downloading it from an external website you'd just need to provide the URL to the help website with the path to the file. If linking from a topic within the project, you'd just need a relative path to the file's location.

Jan 15, 2015 at 1:03 PM
Hi Eric,

Could you provide an example for this? I am asking since I am not sure which link tag I should use (link, exteralLink or conceptualLink). Lets say that I have Files folder with a single file in it added to my project.

In addition I want to say that I want the file to be available for download from the documentation web site.

Thank you in advance.
Jan 15, 2015 at 7:26 PM
You can use an external link:
    <linkText>Downloadable File</linkText>
    <linkAlternateText>Download this file</linkAlternateText>
The link element is for links to other topics. They get converted to conceptualLink behind the scenes at build time. The conceptualLink element can be used in XML comments too in order to link to a conceptual topic. If you want to do the above in XML comments, just use a standard HTML anchor (a) link.

Jan 26, 2015 at 4:46 PM
Hi Eric,

Thank you for the example.

This works perfectly with .chm file or the documentation web site, however it is not working when I am building Help 2 or Help 3 for MS Visual Studio. What should I use in this case?

Thank you in advance.
Jan 26, 2015 at 7:35 PM
For Help 2 and MS Help Viewer I'm not aware of any way to get it to work. I don't remember if Help 2 modifies the URLs but I know MS Help Viewer does so it's probably something related to that. Your only option may be to host it externally on a website and link to it that way.