I have a solution and a few projects in it. Then there’s a Utils file I just Made and added to the solution. But when I want to use this file from any of the projects in the solution, it gets copied in the project’s folder.
So If I use it in 10 projects, it gets copied 10 times. How can I avoid this and make the projects search for that file in the their solution’s folder?
In the Add Existing Item dialog box, select the Add As Link operation instead of Add. You find it in the dropdown-esque menu inside the Add button.
You could also put the shared code into a separate assembly. In my opinion, solutions with lots of linked files are more confusing, while separate projects can show the structure the developer had in mind when developing.