什么是ResolveAssemblyReference.cache?ResolveAssemblyReference、cache

2023-09-03 09:55:11 作者:戓汻、冭兲浈

我试图找出这个文件(或者说,这些文件)进行。

I'm trying to figure out what this file is (or rather, these files are) for.

我发现一个数字,提到它的网页,但问题的答案总是像这个文件是不是你的问题 - 没有描述的文件是什么。我没有看到MSDN上一个明显的网页,无论是。

I've found a number of webpages that mention it, but the answer to the question is always something like "this file is not your problem" -- without describing what the file is. I don't seen an obvious page on MSDN, either.

该文件本身是pretty的大,而不是纯文本(虽然拥有大量的文字)。我猜这件事情只有在编译过程中使用,但修改日期早于我的任何目标文件。难道这与 * .pdb文件在所有或调试?

The files themselves are pretty big, and not text-only (though they have a lot of text). I'm guessing it's something used during compilation only, though the modification date is older than any of my object files. Is this related to *.pdb files or debugging at all?

推荐答案

它是由ResolveAssemblyReference构建目标所产生的文件。 MSDN有这样说的:

It is a file produced by the ResolveAssemblyReference build target. MSDN has this to say about it:

Visual Studio中尝试执行   某些名字的目标时,   加载的项目。这些目标包括:   编译,ResolveAssemblyReferences,   ResolveCOMReferences,   GetFrameworkPaths,和   CopyRunEnvironmentFiles。 Visual Studio中   运行这些目标,以使   编译器可以被初始化以提供   智能感知,调试器可以   初始化,并显示参考   在解决方案资源就可以解决。   如果这些目标没有present中,   项目将加载并建立正确   但在设计时体验   Visual Studio将不会完全   功能性。

Visual Studio attempts to execute targets with certain names when it loads a project. These targets include Compile, ResolveAssemblyReferences, ResolveCOMReferences, GetFrameworkPaths, and CopyRunEnvironmentFiles. Visual Studio runs these targets so that the compiler can be initialized to provide IntelliSense, the debugger can be initialized, and references displayed in Solution Explorer can be resolved. If these targets are not present, the project will load and build correctly but the design-time experience in Visual Studio will not be fully functional.

如果我跨$ P $正确PT这一点,我会说,该文件是用来帮助IDE提供了参考节点正确的智能感知和装配基准状态。这是一个相当昂贵的操作,因为有可能很多可以引用的组件。因此,而不是反复这样做的,在.cache文件可以帮助这个快速。删除它是不是一个问题,它会当项目重新加载重新创建。

If I interpret this correctly, I'd say that the file is used to help the IDE provide proper IntelliSense and assembly reference status in the References node. It is a fairly expensive operation since there are potentially a lot of assemblies that can be referenced. So instead of doing this repeatedly, the .cache file can help make this quick. Deleting it isn't an issue, it will be recreated when the project is reloaded.

 
精彩推荐
图片推荐