Visual Studio解决方案文件中的项目GUID用来做什么? [英] What are the project GUIDs in a Visual Studio solution file used for?

查看:153
本文介绍了Visual Studio解决方案文件中的项目GUID用来做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个Visual Studio(2008)解决方案中有多个项目.
我刚刚发现每个项目都使用相同的GUID,因此在解决方案文件中看起来像这样:

I have multiple projects in a single Visual Studio (2008) solution.
I just discovered that each of these projects uses a same GUID, so in the solution file it looks like this:

Project("{FAE04EC0-F103-D311-BF4B-00C04FCBFE97}") = "Pro1", "Pro1\Pro1.csproj", "{...}"
Project("{FAE04EC0-F103-D311-BF4B-00C04FCBFE97}") = "Pro2", "Pro2\Pro2.csproj", "{...}"

我是否必须更改这些GUID,使其具有唯一性?它们的用途是什么?

Do I have to change these GUIDs so they're unique and what are they used for?

推荐答案

解决方案文件中的项目持久性块具有以下格式:

Project persistence block in a solution file has the following format:

Project("{project type GUID}") = "<Project name>", "<project file location>", 
    "{<Unique project GUID>}"
EndProject

因此,期望第一个GUID是唯一的,它唯一地标识处理此类项目的Visual Studio程序包.

So it's expected that first GUID is non-unique, it uniquely identifies Visual Studio package that handles this type of projects.

您发布的GUID很有趣-看起来像是C#项目GUID损坏,它是FAE04EC0-301F-11D3-BF4B-00C04F79EFBC.您是自己更改还是发布问题(例如,您使用的是从右到左的语言环境,例如希伯来语或阿拉伯语).

The GUID you posted is interesting - it looks like mangled C# project GUID, which is FAE04EC0-301F-11D3-BF4B-00C04F79EFBC. Did you change it yourself or is it a posting issue (e.g. you are using right-to-left locale such as Hebrew or Arabic).

这篇关于Visual Studio解决方案文件中的项目GUID用来做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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