C
C#14mo ago
GrahamKracker

❔ Alias in .targets `<Reference` tag

ok so
<Reference Include="Assembly1.dll" Private="false"/>
<Reference Include="Assembly2.dll" Private="false"/>
<Reference Include="Assembly1.dll" Private="false"/>
<Reference Include="Assembly2.dll" Private="false"/>
they both have matching types, causing ambiguous reference errors. i have absolutely no control over these assemblies. i would like to know if its possible to alias them using the targets file, then be able to distribute it and have users retain these aliases
2 Replies
GrahamKracker
GrahamKracker14mo ago
got it :)
<Reference Include="Assembly1.dll" Private="false">
<Aliases>Assembly1Alias</Aliases>
</Reference>
<Reference Include="Assembly2.dll" Private="false">
<Aliases>Assembly2Alias</Aliases>
</Reference>
<Reference Include="Assembly1.dll" Private="false">
<Aliases>Assembly1Alias</Aliases>
</Reference>
<Reference Include="Assembly2.dll" Private="false">
<Aliases>Assembly2Alias</Aliases>
</Reference>
Accord
Accord14mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.