I altered a bunch of project files in our solution, to add a reference path to all of them. I didn't realize that Reference Paths are stored in the .user file for the project. Is there a way to store those in the .csproj file, so they can be checked into source control?
If you're using Visual Basic, select the References page, and then click the Reference Paths button. In the Reference Paths dialog box, type the path of the folder that contains the item you want to reference in the Folder field, and then click the Add Folder button.
You can also right-click the project node and select Add > Project Reference. If you see a References node in Solution Explorer, you can use the right-click context menu to choose Add Reference. Or, right-click the project node and select Add > Reference.
In visual studio, in the solution explorer, expand the project that will reference this other library. You will see "References", right click and choose "Add". Then choose browse on the left.
You can edit the project file by hand and add <ReferencePath>
inside the <PropertyGroup>
tags.
The syntax in my case was
<ReferencePath>$(Codez)\z.Libraries\AutoCAD\2015;
$(Codez)\z.Libraries\AutoCAD\2015\inc-win32;
$(Codez)\z.Libraries\AutoCAD\2015\inc-x64</ReferencePath>
where $Codez
is an Environment variable I set myself and it obviously supports multiple paths. This is in VS2013.
You might try adding the reference as a HintPath, like this:
<Reference Include="MyReference, Version=2.0.3.2, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\lib\Whatever\MyReference.dll</HintPath>
</Reference>
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