Adding a source file into multiple shfbproj's

Topics: User Forum
Nov 23, 2009 at 4:35 PM

I need to Add an Existing Item, an html file, to multiple projects that are in different directories (cannot be the same or their outputs would clash, etc.)  Of course these directories cannot have a common subdirectory, so the shared file can only be in a common parent directory or somewhere explicitly descending from it.  But SHFB seems to restrict added items to the project folder or below (v1.8.0.2).  If you are adding an item and open a file from an ancestor directory, it copies that file into the current project directory.  (This is like the way Visual Studio Add Existing Item to Project works, but VS has a subtle Add as Link option which is exactly what I need in SHFB.)

 

Coordinator
Nov 23, 2009 at 6:47 PM

SHFB supports linked items but there is no way to add them via the GUI.  You need to manually edit the project file to add the link element to the project item:

<Content Include="..\Actual\Path\To\File\SomePage.html">
  <Link>SomePage.html</Link>
</Content>

Eric

 

Nov 23, 2009 at 7:08 PM

Super.  That works.