Share via


IDeploymentContext.SiteUrl Method

Definition

Returns the canonical URL of the Microsoft.SharePoint.SPWeb that the project is connected to, according to SharePoint.

public:
 Uri ^ SiteUrl();
public Uri SiteUrl ();
abstract member SiteUrl : unit -> Uri
Public Function SiteUrl () As Uri

Returns

Uri

The canonical URL of the Microsoft.SharePoint.SPWeb that the project is connected to, according to SharePoint.

Remarks

This may or may not be identical to Microsoft.VisualStudio.SharePoint.ISharePointProject.SiteUrl, but they point to the same resource.

This value is queried from SharePoint so that it is consistent with SiteCollectionUrl.

For example, the Microsoft.VisualStudio.SharePoint.ISharePointProject.SiteUrl may be http://localhost, but SharePoint will resolve it to http://hostname.

Applies to