❔ 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
GrahamKrackerOP2y 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
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server