Reputation: 6776
There is a file C:\Users\Me\source\repos\MyProject\VersionInfo.cs
that is somehow contained within all but one projects in the MyProject
solution; editing one copy of it simultaneously edits all of them, but it only shows up once in source control, at the solution level. How is this possible? How can I add it to the last project? I tried "add existing file" but that just copied it into that folder... if it helps any there is a little blue "arrow in a box" icon on it...
Upvotes: 5
Views: 1482
Reputation: 141730
You have a file which was added as a link. You can read about it for example here or here. You can achieve this via Add -> Existing Item dialog but instead of clicking "Add" click on the dropdown arrow to the right and select "Add As Link":
Or by manually editing .csproj:
<ItemGroup>
<Compile Include="..\OtherFolder\VersionInfo.cs" Link="VersionInfo.cs" />
</ItemGroup>
Upvotes: 9