SLN 文件中的 GUID
Visual Studio 解决方案文件的每个项目条目包含两个 GUID。 我想其中之一来自 AssemblyInfo.cs
有谁知道它们来自哪里以及它们的用途吗?
Visual Studio Solution files contain two GUID's per project entry. I figure one of them is from the AssemblyInfo.cs
Does anyone know for sure where these come from, and what they are used for?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据 MSDN:
According to MSDN:
这两个 GUID 都与 AssemblyInfo.cs 中的 GUID 不同(即程序集本身的 GUID,不与 Visual Studio 绑定,而是与构建的最终产品绑定)。
因此,对于 sln 文件中的典型行(如果您希望看到它,请在记事本或选择的编辑器中打开 .sln):
第二个 GUID 是项目本身的唯一 GUID。 解决方案文件使用它来将其他设置映射到该项目:
第一个 GUID 实际上是一个 GUID,它是解决方案本身的唯一 GUID(我相信)。 如果您的解决方案包含多个项目,您实际上会看到类似以下内容的内容:
Neither GUID is the same GUID as from AssemblyInfo.cs (that is the GUID for the assembly itself, not tied to Visual Studio but the end product of the build).
So, for a typical line in the sln file (open the .sln in notepad or editor-of-choice if you wish to see this):
The second GUID is a unique GUID for the project itself. The solution file uses this to map other settings to that project:
The first GUID is actually a GUID that is the unique GUID for the solution itself (I believe). If you have a solution with more than one project, you'll actually see something like the following: