Adds a reference to a Web Service to the project. A new Web Service reference subfolder is added to the Web References folder of the project. This new folder contains several other project items related to the Web Service.
Namespace: Microsoft.VisualStudio.Package.Automation
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Public Function AddWebReference ( _
bstrUrl As String _
) As ProjectItem
'使用
Dim instance As OAVSProject
Dim bstrUrl As String
Dim returnValue As ProjectItem
returnValue = instance.AddWebReference(bstrUrl)
public ProjectItem AddWebReference(
string bstrUrl
)
public:
virtual ProjectItem^ AddWebReference(
String^ bstrUrl
) sealed
public final function AddWebReference(
bstrUrl : String
) : ProjectItem
Parameters
bstrUrl
Type: System.StringThe URL of the Web reference.
Return Value
Type: ProjectItem
When implemented in a derived class, the ProjectItem object associated with the new Web Service folder.
Remarks
This is a VSProject method and is not implemented in this class. It throws an exception.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.