Skip to content

Do not use HintPath for added metadata references #3867

@tmat

Description

@tmat

Instead of

<Reference Include="Lib.dll">
  <HintPath>..\..\Lib.dll</HintPath>
</Reference>

generate

<Reference Include="..\..\Lib.dll" />

@jasonmalinowski:

I (at least, probably @jaredpar too) consider the IDE's form there to be a bug. Because in the simple case, HintPath is looked at fairly late; if the Reference Include simple name can be resolved, the HintPath often gets ignored. We've had plenty of "surprises" over the years, and honestly I wished the second was what we generated. For Roslyn, we just said the second is the only form because the first is a regret.

See full discussion on dotnet/arcade#428 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature-Project-File-EditingEditing the project either while open in Visual Studio, or via other mechanism.Triage-ApprovedReviewed and prioritized

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions