gpt4 book ai didi

visual-studio-2008 - Visual Studio 2008 - 添加引用

转载 作者:行者123 更新时间:2023-12-03 13:41:46 26 4
gpt4 key购买 nike

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

最佳答案

源代码管理:

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

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

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 说的:

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 说的:

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.



.刷新 from a blog post about .refresh files:

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.

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 - Visual Studio 2008 - 添加引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/162192/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com