I’ve had a quick play with adding the contents of a folder from another project, i.e. I want to add links to all the files in another project’s folder. So for example; I have a project called ConsoleApplication1 and I want to ensure it always has links to the images in another project called ClassLibrary1 (yes nice names eh). So first create a folder with the same name, e.g. images, in ConsoleApplication1. Add a link to one of the files in ClassLibrary1\Images (Add existing item->add as link). Unload ConsoleApplication1 and Edit the project file. Locate the Content Include and replace it as follows;
<ItemGroup> <Content Include="..\ClassLibrary1\images\*.*"> <Link>images\%(RecursiveDir)%(FileName)</Link> </Content> </ItemGroup>
So whatever changes you make to ClassLibrary1\Images will automatically be reflected in ConsoleApplication\Images. It’s early days but it seems to run ok.
You should also include the %(Extension) transform:
images\%(RecursiveDir)%(FileName)%(Extension)
kinggudu
thank you very much!
How to include sub folders also along with files ??
Thank you,
How to include sub folders along with files
Thank you.