IDeploymentContext.SiteUrl 方法

返回项目根据 SharePoint 连接到的 Microsoft.SharePoint.SPWeb 的规范 URL。

命名空间:  Microsoft.VisualStudio.SharePoint.Deployment
程序集:  Microsoft.VisualStudio.SharePoint(在 Microsoft.VisualStudio.SharePoint.dll 中)

语法

声明
Function SiteUrl As Uri
Uri SiteUrl()

返回值

类型:System.Uri
项目根据 SharePoint 连接到的 Microsoft.SharePoint.SPWeb 的规范 URL。

备注

这可能与 ISharePointProject.SiteUrl 相同也可能不同,但它们指向同一资源。

此值是从 SharePoint 查询的,因此它与 SiteCollectionUrl 一致。

例如,ISharePointProject.SiteUrl 可能是 https://localhost,但 SharePoint 会将其解析为 http://hostname。

.NET Framework 安全性

请参见

参考

IDeploymentContext 接口

Microsoft.VisualStudio.SharePoint.Deployment 命名空间