ServerDocument.DeploymentManifestUrl 속성 (2007 시스템)

업데이트: 2007년 11월

문서와 연결된 Visual Studio Tools for Office 사용자 지정의 배포 매니페스트 URL을 가져오거나 설정합니다.

네임스페이스:  Microsoft.VisualStudio.Tools.Applications
어셈블리:  Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0(Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0.dll)

구문

Public Property DeploymentManifestUrl As Uri

Dim instance As ServerDocument
Dim value As Uri

value = instance.DeploymentManifestUrl

instance.DeploymentManifestUrl = value
public Uri DeploymentManifestUrl { get; set; }

속성 값

형식: System.Uri

문서와 연결된 사용자 지정에 대한 배포 매니페스트의 이름 및 위치를 지정하는 URL입니다.

설명

사용자 지정의 배포 매니페스트를 다른 위치로 이동하고 문서에서 사용자 지정 업데이트를 새 위치에서 찾도록 하려면 이 속성을 새 URL로 설정합니다. 이 속성을 설정하는 경우 URL은 문서와 이미 연결된 사용자 지정의 배포 매니페스트를 가리켜야 합니다.

이 속성을 사용하여 새 사용자 지정을 문서와 연결할 수는 없습니다. 사용자 지정되지 않은 문서에 사용자 지정을 추가하려면 AddCustomization 메서드를 사용합니다. 사용자 지정된 문서에 다른 사용자 지정을 추가하려면 먼저 RemoveCustomization 메서드를 사용하여 현재 사용자 지정을 제거한 다음 AddCustomization 메서드를 사용합니다.

예제

다음 코드 예제에서는 ServerDocument(String) 생성자를 사용하여 지정된 문서를 로드하는 새 ServerDocument를 만듭니다. 그런 다음 문서와 연결된 Visual Studio Tools for Office 사용자 지정의 배포 매니페스트 URL을 표시합니다.

이 예제를 사용하려면 Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0.dll과 Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll 어셈블리에 대한 참조, Microsoft.VisualStudio.Tools.ApplicationsMicrosoft.VisualStudio.Tools.Applications.Runtime 네임스페이스에 대한 Imports(Visual Basic) 또는 using(C#) 문을 코드 파일 맨 위에 추가해야 합니다.

Private Sub CreateServerDocumentFromPath(ByVal documentPath As String)
    Dim runtimeVersion As Integer = 0
    Dim serverDocument1 As ServerDocument = Nothing

    Try
        runtimeVersion = ServerDocument.GetCustomizationVersion(documentPath)
        If runtimeVersion = 3 Then
            serverDocument1 = New ServerDocument(documentPath)
            MessageBox.Show("The URL of the deployment manifest is: " & vbLf & _
                serverDocument1.DeploymentManifestUrl.ToString())
        End If

    Catch ex As System.IO.FileNotFoundException
        System.Windows.Forms.MessageBox.Show("The specified document does not exist.")
    Catch ex As UnknownCustomizationFileException
        System.Windows.Forms.MessageBox.Show("The specified document has a file " & _
            "extension that is not supported by Visual Studio Tools for Office.")
    Finally
        If Not (serverDocument1 Is Nothing) Then
            serverDocument1.Close()
        End If
    End Try
End Sub
private void CreateServerDocumentFromPath(string documentPath)
{
    int runtimeVersion = 0;
    ServerDocument serverDocument1 = null;

    try
    {
        runtimeVersion = ServerDocument.GetCustomizationVersion(documentPath);
        if (runtimeVersion == 3)
        {
            serverDocument1 = new ServerDocument(documentPath);
            MessageBox.Show("The URL of the deployment manifest is: \n" +
                serverDocument1.DeploymentManifestUrl.ToString());
        }
    }
    catch (System.IO.FileNotFoundException)
    {
        System.Windows.Forms.MessageBox.Show("The specified document does not exist.");
    }
    catch (UnknownCustomizationFileException)
    {
        System.Windows.Forms.MessageBox.Show("The specified document has a file " +
            "extension that is not supported by Visual Studio Tools for Office.");
    }
    finally
    {
        if (serverDocument1 != null)
            serverDocument1.Close();
    }
}

권한

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

ServerDocument 클래스

ServerDocument 멤버

Microsoft.VisualStudio.Tools.Applications 네임스페이스