I would like to have a file in several different projects of a solution, however, Visual Studio only allows one link per solution to the file. Is there a way around this?
What is the issue of having several soft links to a single file within a VS project?
Update: I have added the link as described from the comments below, it seems that the issue is on a per project basis. There can not be multiple links to the same file within the project. When I attempt to add the link I receive the following error - "There is already a link to ''. A project cannot have more than one link to the same file."
To add a file as a link, right click and choose Add > Existing Item… as before, but this time, don't click the Add button. Instead, click the little dropdown arrow next to the Add button and select Add as Link. Instead of copying the file into the project directory, Visual Studio will create a link to the original.
If you select Start Collaboration session from the Session Details menu, an invitation link to your session will automatically be copied to your clipboard. You can share this link with anyone you'd like to collaborate with, as long as they also have VS Code and the Live Share Extension Pack downloaded.
Every Visual Studio project includes an MSBuild project file, with a file extension that reflects the type of project—for example, a C# project (. csproj), a Visual Basic.NET project (. vbproj), or a database project (. dbproj).
You could create several links to one file on ONE project, but manually and VS will not show it in project tree.
unload project and add for example links:
<Content Include="..\..\_Common\js\JQuery\jquery.js">
<Link>Sites\OrgCatalogSite\Design\js\JQuery\jquery.js</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\_Common\js\JQuery\jquery.js">
<Link>Sites\TasksManagersSite\Design\js\JQuery\jquery.js</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
I am using Visual Studio 2008 Professional, and it allows the same file from one project to be soft-linked to every other project, independently of the number of solution files you are using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With