Share via


IVsUpgradeBuildPropertyStorage.ReplaceImport Method

Replaces an import in the project file with a new import.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.9.0 (in Microsoft.VisualStudio.Shell.Interop.9.0.dll)

Syntax

'Declaration
Function ReplaceImport ( _
    pszOldImportPath As String, _
    pszOldCondition As String, _
    pszNewImportPath As String, _
    pszNewCondition As String _
) As Integer
int ReplaceImport(
    string pszOldImportPath,
    string pszOldCondition,
    string pszNewImportPath,
    string pszNewCondition
)
int ReplaceImport(
    [InAttribute] String^ pszOldImportPath, 
    [InAttribute] String^ pszOldCondition, 
    [InAttribute] String^ pszNewImportPath, 
    [InAttribute] String^ pszNewCondition
)
abstract ReplaceImport : 
        pszOldImportPath:string * 
        pszOldCondition:string * 
        pszNewImportPath:string * 
        pszNewCondition:string -> int
function ReplaceImport(
    pszOldImportPath : String, 
    pszOldCondition : String, 
    pszNewImportPath : String, 
    pszNewCondition : String
) : int

Parameters

  • pszOldImportPath
    Type: System.String

    [in] The path to the file to be replaced.

  • pszNewImportPath
    Type: System.String

    [in] The path to the new file to be imported.

  • pszNewCondition
    Type: System.String

    [in] The new condition to evaluate.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell90.idl:

HRESULT ReplaceImport(
    [in] LPCOLESTR pszOldImportPath,
    [in] LPCOLESTR pszOldCondition,
    [in] LPCOLESTR pszNewImportPath,
    [in] LPCOLESTR pszNewCondition
);

.NET Framework Security

See Also

Reference

IVsUpgradeBuildPropertyStorage Interface

Microsoft.VisualStudio.Shell.Interop Namespace