I want VS2017 to automatically select the correct version of “Kvaser.CanLib.dll” when I build my project.
I have found one method to do it (there might be more methods).
In my directory structure for the project, there is a file we can edit:
CANlib_VS2017_DEMO.csproj.user (ProjName.csproj.user)
But I can not find it! Where is it?
OK, no problem. It is not created by default, only when needed.
Let us create it!
This file is little like Harry Potter’s “Room of Requirement”; it can be almost whatever we want it to be.
Open “Project” – “ProjName Properties…”:
Go to the section “Reference Paths” and add the path to the WIN32 “Kvaser.CanKib dll”.
Please remember to press the button “Add Folder”.
I save my project and close VS2017.
Now, when I check my project directory, I can find the file “ProjName.csproj.user”.
Open it in a text editor, and my file looks like this:
(Please note, this file can contain a lot of information, so it is necessary to locate the part where the “ReferencePath” has been defined.)
I am now adding some lines, and when I am done, my file looks like this: