I'm trying to write a custom project (targets?) file that is to be included in several projects.
For example, inside all of my .csproj and .vbproj files I have:
<Import Project="..\MyCustomTargets\custom.targets"/>
Inside that file I have a custom target (AfterBuild) which copies the compiled files to another location.
However, I'd like to add a reference path that each project can look to when trying to resolve references. Is this possible?
For example, I'd like to add something like this to my .targets file:
<AdditionalReferencePath>C:\LookHereForReferences</AdditionalReferencePath>
I've found a few links that describe a little about how to do this but I can't get it working.
You can set a Property Group in your .targets file:
After import this targets file in to the project file, you can look it by $(AdditionalReferencePath) when trying to resolve references: