Visual Studio 2010中引用第三方DLL给出了原始DLL路径?
我想将 Expression Blend 4 中的第三方 DLL 添加到我的源代码管理中,这样我就不必在我的 TFS 构建服务器,以便构建成功。
我已从 C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\ 复制了 DLL 文件 (
到我的源的根目录并将文件签入TFS。Microsoft.Expression.Interactions.dll
)库
但是,如果我通过 Visual Studio 2010 中的“添加引用”菜单引用复制的 DLL 填充(放置在 C:\Source\
中),则 DLL 文件将获得引用,但如果我查看属性窗口以供参考,该路径会指向原始 DLL 文件路径(即 C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.5)。 0\Libraries\Microsoft.ExpressionInteractions.dll)。
如果我从 Blend 目录中删除 DLL 文件,它可以正常工作,但这不是一个好的解决方案,因为我还想添加其他第三方 DLL 文件,因为我很快就会失去控制肯定会破坏一堆程序。
I'd like to add a third-party DLL from Expression Blend 4 to my source control, so that I don't have to install Expression Blend (or perhaps just the SDK) on my TFS Build server, in order to have a succesful build.
I've copied the DLL file (Microsoft.Expression.Interactions.dll
) from C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries
to the root of my source and checked the file into TFS.
However, if I reference the copied DLL fill (placed in C:\Source\<Project>\Microsoft.ExpressionInteractions.dll
) via the Add Reference menu in Visual Studio 2010 the DLL file gets reference allright, but if I look at the properties windows for the reference, the path points to the original DLL file path (that is, C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries\Microsoft.ExpressionInteractions.dll
).
If I remove the DLL file from the Blend-directory it works fine, but that's not a good solution, as I have other third party DLL files that I'd like to have added as well, as I'll loose control pretty quickly then and break a bunch of programs for sure.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用的是 Visual Studio 2010 的 Productivity Power Tools 2010 年 7 月版,并使用“浏览”按钮在源代码树中查找 DLL 文件。
显然,Power Tools 中的“添加引用”功能试图以某种方式“智能”地引用 DLL 文件并为我更改了路径。
尝试在我的笔记本电脑(我没有安装 Power Tools)上添加 DLL 文件后,路径没问题!?
我想我必须对此进行更多调查......但就目前而言,这似乎是“答案”。
I was using the July 2010 version of the Productivity Power Tools for Visual Studio 2010 and using the Browse button to locate my DLL file within my source tree.
Apparently, the "Add Reference" functionality in the Power Tools somehow tries to "be smart" about referencing DLL files and changed the path for me.
After trying to add the DLL files on my laptop (where I don't have the Power Tools installed) the path is fine!?
I think I'll have to investigate this a bit more... But for now, this seems to be "the answer".