Closed knatten closed 4 years ago
This happens when you add reference and build it:
Yes, and that might be convenient if you have a local project you're working on on your machine alone. But the paths will only be valid on that particular machine, and shouldn't be committed to a shared repository imo.
Then instead we should have a tutorial on how to add references?
No we need to add these references, but we need to not give wrong HintPath
s. I have two suggestions for that in the original issue description. I think @chrisasc is working on this now.
I think this is fixed now, e.g. https://github.com/zivid/csharp-extra-samples/blob/master/source/Camera/Basic/Capture/Capture.csproj
Yup, we're all good:
👻 git grep HintPath | awk '{print $2}' |sort|uniq
<HintPath>$(ZIVID_INSTALL_FOLDER)\bin_debug\ZividCoreNET.dll</HintPath>
<HintPath>$(ZIVID_INSTALL_FOLDER)\bin_debug\ZividVis3DNET.dll</HintPath>
<HintPath>$(ZIVID_INSTALL_FOLDER)\bin\ZividCoreNET.dll</HintPath>
<HintPath>$(ZIVID_INSTALL_FOLDER)\bin\ZividVis3DNET.dll</HintPath>
For some reason we have these
HintPath
s in all our csprojs:I don't understand why they're there, I assume this will only work if you happen to have cloned this repo at a very specific folder depth.
Maybe we should use
ZIVID_INSTALL_FOLDER
here, like we do in thexcopy
commands? And maybe we should then specify the full path to the dll in theInclude=
attribute, instead of using aHintPath
element?I'm not sure what the best practice is here, but what we're currently doing seems wrong.