ClickOnce] Exception occurs when deploying manually with ClickOnce MS] Setup & Deploy

Visual Studio 2008 에서 Build 된 App를 사용하여, 수동으로 ClickOnce 응용 프로그램을 배포했을 때 다음과 같은 오류를 접하게 됩니다.
참조] 수동으로 ClickOnce 응용 프로그램 배포 : http://msdn.microsoft.com/ko-kr/library/xc3tc5xx(VS.80).aspx

PLATFORM VERSION INFO
    Windows             : 6.0.6001.65536 (Win32NT)
    Common Language Runtime     : 2.0.50727.3053
    System.Deployment.dll         : 2.0.50727.3053 (netfxsp.050727-3000)
    mscorwks.dll             : 2.0.50727.3053 (netfxsp.050727-3000)
    dfdll.dll             : 2.0.50727.3053 (netfxsp.050727-3000)
    dfshim.dll             : 2.0.50727.3053 (netfxsp.050727-3000)

SOURCES
    Deployment url            : http://localhost:7777/ClickOnceHelloWorld.application
                        Server        : Microsoft-IIS/7.0
                        X-Powered-By    : ASP.NET
    Deployment Provider url        : http://localhost:7777/ClickOnceHelloWorld.exe.manifest

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of http://localhost:7777/ClickOnceHelloWorld.application resulted in exception. Following failure messages were detected:
        + The Deployment Provider specified in the manifest cannot be reached. Maybe due to network error and/or the deployment provider is not responding correctly.
        + Exception reading manifest from http://localhost:7777/ClickOnceHelloWorld.exe.manifest: the manifest may not be valid or the file could not be opened.
        + Deployment manifest is not semantically valid.
        + Deployment manifest requires <deployment> section.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [2009-06-01 오전 11:48:04] : Activation of http://localhost:7777/ClickOnceHelloWorld.application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [2009-06-01 오전 11:48:04] System.Deployment.Application.InvalidDeploymentException (Manifest)
        - The Deployment Provider specified in the manifest cannot be reached. Maybe due to network error and/or the deployment provider is not responding correctly.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
        --- Inner Exception ---
        System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Exception reading manifest from http://localhost:7777/ClickOnceHelloWorld.exe.manifest: the manifest may not be valid or the file could not be opened.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
        --- Inner Exception ---
        System.Deployment.Application.InvalidDeploymentException (ManifestSemanticValidation)
        - Deployment manifest is not semantically valid.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForDeploymentRole()
            at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
        --- Inner Exception ---
        System.Deployment.Application.InvalidDeploymentException (InvalidManifest)
        - Deployment manifest requires <deployment> section.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForDeploymentRole()

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

이는 Visual Studio 2008 의 Bug(? : 사실 Bug로 보기에는 좀 애매모호합니다만…) 입니다. 원인은 다음과 같습니다.

Visual Studio 2008 은 Application 실행파일의 UAC Setting 과 관련된 내용을 포함하여 빌드하게 됩니다.
MageUI (Mage) 를 사용하여 Manifest 를 만들게 되었을 때도 UAC Setting 과 관련된 내용이 포함되고, Manifest(Application & Deployment) 와 실행파일의 UAC Setting 부분이 충돌하여 발생한 것입니다.

이를 해결하기 위해서는 Build 할 때, 다음과 같이 Manifest 의 Option 을 변경하여 사용하면 문제가 해결됩니다.

다음과 같이 Project Property > Application Tab > Resources > Manifest 에서 Embed manifest with default settings 에서 Create application without a manifest 로 변경한 후 빌드하셔서, 사용하시면 됩니다.


덧글

댓글 입력 영역