Visual Studio 中添加的引用的 HintPath [英] HintPath on a added reference in Visual Studio

查看:52
本文介绍了Visual Studio 中添加的引用的 HintPath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以将 HintPath 添加到外部 DLL 以帮助 Visual Studio/TFS 在构建时找到 dll.

I know that I can add a HintPath to an external DLLs to help Visual Studio/TFS find the dll when it builds.

我想知道的是...是否可以添加多个HintPath?

What I was wondering is... is it possible to add multiple HintPath?

例如……开发人员将他们的 DLL 放在一个地方,我们在服务器上的不同位置对这些 DLL 进行 GetLatest,因此需要多个 HintPath.

For example... developers have their DLLs for one place and we do a GetLatest of those DLLs at a different place on the server hence the need for multiple HintPath.

你怎么看,世界?

推荐答案

此答案不再有效.正如Sardaukar 的评论所说,Visual Studio 总是盲目地使用最后一个 HintPath.亚历克斯的回答支持这一点.

This answer is no longer valid. As Sardaukar's comment says, Visual Studio always blindly uses the last HintPath. Alex's answer supports this.

好的.这次我比 Stackoverflow 快.我尝试添加它,它似乎工作正常.

Alright. I'm faster than Stackoverflow this time. I tried to add it and it seems to work fine.

所以多个 HintPath 是可能的.

So multiple HintPath IS possible.

当你有这个时:

<Reference Include="System.ComponentModel.Composition.Codeplex">
    <HintPath>......MEF2_Preview2inSystem.ComponentModel.Composition.Codeplex.dll</HintPath>
</Reference>

您可以简单地添加更多这样的提示路径:

You can simply add more hint path like that:

<Reference Include="System.ComponentModel.Composition.Codeplex">
    <HintPath>......MEF2_Preview2inSystem.ComponentModel.Composition.Codeplex.dll</HintPath>
    <HintPath>D:MEFSystem.ComponentModel.Composition.Codeplex.dll</HintPath>
</Reference>

这篇关于Visual Studio 中添加的引用的 HintPath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆