Visual Studio 2008-添加参考 [英] Visual Studio 2008 - Add Reference

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

问题描述

当添加DLL作为对ASP.Net项目的引用时,VS2008将多个文件添加到bin目录.如果DLL被称为foo.dll,则VS2008将添加foo.dll.refresh,foo.pdb和foo.xml.我知道什么是foo.dll :-),为什么VS2008添加其他三个文件?这三个文件做什么?我可以删除它们吗?是否需要在源代码管理中添加它们?

When adding a DLL as a reference to an ASP.Net project, VS2008 adds several files to the bin directory. If the DLL is called foo.dll, VS2008 adds foo.dll.refresh, foo.pdb and foo.xml. I know what foo.dll is :-), why does VS2008 add the other three files? What do those three files do? Can I delete them? Do they need to be added in source control?

推荐答案

源代码控制:

Ben Straub在对本文的评论中说:如果需要,应将.dll.refresh文件添加到源代码管理中,而不应添加.xml.pdb和当然是.dll文件.

Ben Straub said in a comment to this post: The .dll.refresh files should be added to the source control if required, while the .xml, .pdb and of course the .dll files should not be added.

John Rudy解释了何时添加.refresh文件:

John Rudy explained when to add the .refresh file:

为什么这有时是一件好事? 假设您在团队中 环境.有人签入代码 foo.dll和您的构建系统 构建一个新的DLL,将其输出到 服务器上的文件共享.你刷新 文件指向该服务器的副本 DLL.下次构建时,VS将 自动神奇地获取最新的 该DLL的最大副本.

Why is this a good thing (sometimes)? Let's say you're in a team environment. Someone checks in code for foo.dll, and your build system builds a new DLL, outputting it in a file share on a server. Your refresh file points to that server copy of the DLL. Next time you build, VS will auto-magically grab the latest and greatest copy of that DLL.

.xml ,如David Mohundro所说:

.xml like David Mohundro said:

该xml文件用于XML注释 和智能. Visual Studio将 解析并显示XML 致电时添加的评论 这些DLL中的方法.

The xml file is there for XML comments and intellisense. Visual Studio will parse that and display the XML comments that were added when you call methods in those DLLs.

.pdb ,如David Mohundro所说:

.pdb like David Mohundro said:

pdb用于调试和 符号.如果有例外 从中抛出,您将能够获得 stacktraces等.您可以控制 选择是否PDB是 内置.

The pdb is there for debugging and symbols. If you get an exception thrown from it, you'll be able to get stacktraces, etc. You're in control of choosing whether or not the PDB is built.

.刷新 来自有关.refresh文件的博客文章:

它告诉VS在哪里寻找更新 具有相同基数的dll版本 姓名.它们是文本文件,您可以打开 他们,并查看其使用的路径.

It tells VS where to look for updated versions of the dll with the same base name. They're text files, you can open them and see the path it's using.

他们的目的是防止您 必须自己复制新版本. 在VS2003中,项目文件将 包含 参考,但由于VS2005没有 将项目文件用于ASP.NET 项目,这是替代 该特定功能.

Their purpose is to prevent you from having to copy new versions yourself. In VS2003, the project file would contain the source location of the reference, but since VS2005 doesn't use project files for ASP.NET projects, this is the replacement for that particular functionality.

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

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