Make visual studio ALWAYS have a relative path for links?

Whenever I add a link that is not in the current project directory, it makes it an absolute path. So, we have to edit the project file and edit it as relative. As a group of about half a dozen developers, someone always forgets to do this on a regular basis (especially when building a project with a lot of links).

Is there a way to make the paths ALWAYS relative? I don't see an option in the settings. We can't be the only developers looking for relative paths.

Any suggestions or solutions?

thank

+3


source to share


1 answer


You need to put your links in the current solution / project directory structure in order to take advantage of this default feature. For example, if you have a structure like this ...

\FolderA\FolderB\References\abc.dll
\FolderC\my.sln
\FolderC\Project\my.csproj

      

... then VS doesn't seem to be able to determine the correct relevance.

You should (and this is where I went with link controlled sources) consider a structure like this ...



\FolderC\my.sln
\FolderC\References\abc.dll
\FolderC\Project\my.csproj

      

... this allows VS to understand all the paths used for the project and allows relative paths.

I would recommend adding references to the original control (usually not that much disk space), as it can save you other versioning issues.

Disclaimer: This is from observation, I cannot find anything from MS documenting it.

0


source







All Articles