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.

1 Answer 1

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.