IVsAddWebReferenceResult.Save Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Saves reference metadata in the project and creates a new Windows Communication Foundation (WCF) service reference.
public:
System::Object ^ Save();
public:
Platform::Object ^ Save();
winrt::Windows::Foundation::IInspectable Save();
public object Save ();
abstract member Save : unit -> obj
Public Function Save () As Object
Returns
A IVsWCFReferenceGroup object.
Examples
The following example demonstrates how to call the Save method.
if (addWebReferenceResult != null && cancelled == 0)
{
return addWebReferenceResult.Save() as IVsWCFReferenceGroup;
}
else
{
return null;
}
Remarks
The Save method can be used to save reference metadata in the project and to create a new WCF service reference. The save operation may fail for the following reasons:
The reference namespace is already used by a service reference in the client project.
There is a directory or file item with the same namespace in the directory where the service reference would be persisted. This can occur even if the directory or file item is not in the project.
The reference name is already used in the same namespace (directory) in a Web Site project. Web Site projects support adding multiple references in one namespace.