9

I have a Visual Studio Project Solution which consists of 3 projects. I want the CSS to be shared by these 3 projects in the VS Solution to minimize the changes since all of them are using the same CSS rules.

How can I achieve this? I tried the Add As Link function but the project does not seem to use the linked CSS.

Thanks.

Sebastiaan M
  • 5,775
  • 2
  • 27
  • 28
vincent
  • 507
  • 2
  • 6
  • 12

1 Answers1

10

This related question gives a very easy step-by-step overview of how to use "Add As Link".

Note that your linked files will not be accessible while debugging your project, unless you add a task to your Project File to manually copy your linked files as described here.

Example:

<Target Name="CopyLinkedContentFiles" BeforeTargets="Build">
    <Copy SourceFiles="%(Content.Identity)" 
          DestinationFiles="%(Content.Link)" 
          SkipUnchangedFiles='true' 
          OverwriteReadOnlyFiles='true' 
          Condition="'%(Content.Link)' != ''" />
</Target>
Community
  • 1
  • 1
Mac
  • 1,201
  • 2
  • 15
  • 28