1 year ago

#339308

test-img

Chaeeun Kim

Question regarding hintpath and reference path in csproj file in C#

I have been struggling with an assembly path. I have been searching many articles and answers from stackoverflow, but cannot find any answers for my questions.

  Just in case, I removed publicKeyToken.
<Reference Include="DevExpress.DataAccess.v20.1, Version=20.1.7.0, Culture=neutral, PublicKeyToken=">
<Reference Include="DevExpress.Pdf.v20.1.Core, Version=20.1.7.0, Culture=neutral, PublicKeyToken=, processorArchitecture=MSIL"> 
 <HintPath>..\packages\DevExpress.Pdf.Core.20.1.7\lib\net452\DevExpress.Pdf.v20.1.Core.dll</HintPath>
</Reference>
  1. As you can see from the above reference, the first referece does not have hintpath or any specified reference path, but it builds assembly well. How does project know where the .dll file is located?

  2. I encountered nuget build error in the second reference, but resolved the error after I put DevExpress.Pdf.Core.20.1.7\lib\net452\DevExpress.Pdf.v20.1.Core.dll file to the hintpath location. why the reference needs hintpath unlike the first one?

Please someone help me

c#

reference

nuget

.net-assembly

0 Answers

Your Answer

Accepted video resources