[英]How to know if a Visual Studio project item is a WebReference?
I'm developing a Visual Studio extensibility package. 我正在开发一个Visual Studio可扩展性包。 I need to get the files under a project hierarchy using
IVsSccProject2.GetSccFiles
. 我需要使用
IVsSccProject2.GetSccFiles
在项目层次结构下获取文件。
Visual Studio behaves different for an standard folders and for WebReferences: Visual Studio对于标准文件夹和WebReferences的行为不同:
This causes a problem because I use a common function to enumerate files under a project item. 这会导致问题,因为我使用通用函数枚举项目项下的文件。
How can I determine if the project item is a web reference or a standard folder? 如何确定项目项是Web引用还是标准文件夹?
I tried to get the item type using: 我尝试使用以下方式获取项目类型:
hierProject.GetGuidProperty(
itemid,
(int)__VSHPROPID.VSHPROPID_TypeGuid,
out guid);
but in this case the returned GUID is always Physical Folder ( 6BB5F8EF-4483-11D3-8BCF-00C04F8EC28C
) for both WebReference and standard folder. 但在这种情况下, 返回的GUID始终是WebReference和标准文件夹的物理文件夹(
6BB5F8EF-4483-11D3-8BCF-00C04F8EC28C
)。
根据上面的注释,使用GetSccSpecialFiles方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.