In my one of the MSI Installer I am updating the assembly and project reference relative path pro-grammatically.My all reference assemblies inside my application folder.
I try to implement both the path relative and absolute path. Both are working fine.
Relative Path
<Reference Include="log4net">
<HintPath>..\..\..\..\log4net.dll</HintPath>
</Reference>
Absolute path
<Reference Include="log4net">
<HintPath>C:\Program files\Myapplication\log4net.dll</HintPath>
</Reference>
I have only seen absolute path reference when I take the reference of assembly from the Reference Assemblies Path or GAC files.
C:\Program Files (x86)\Reference Assemblies
<Reference Include="System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dll</HintPath>
</Reference>
Which one is correct approach for updating path into .Csproj
file?