如何正确发布我的应用程序? [英] How do I correctly publish my app?

查看:77
本文介绍了如何正确发布我的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio创建我的第一个Windows桌面c#wpf应用程序。

I am using visual studio to create my first windows desktop c# wpf app.

我正处于要发布/部署/构建它的阶段。

I am at the phase I want to release/deploy/build it.

在Visual Studio Express 2013中,我右键单击项目,然后单击发布,然后单击下一步,将发布位置保留为默认值,因为我不知道应该输入什么,接下来我选择可以让用户从CD-ROM / DVD安装并告诉它不要检查更新并单击完成。

In Visual Studio Express 2013 I right click my project and click publish, I click next and leave the publish location default as I dont know what I should put, next I choose to have the users install from a cd-rom/dvd and tell it not to check for updates and click finish.

然后在我的桌面上创建一个 clickonce应用程序。因此,我将其上传到Web服务器,下载并尝试运行它。

It then create a 'clickonce' application on my desktop. So I upload to it a web server, download it, and try to run it.

失败。

它说:

Cannot download the application. The application is missing required files. Contact application vendor for assistance. 

如果单击详细信息,我会获得更多详细信息:

If I click details I get more detailed info:

PLATFORM VERSION INFO
    Windows             : 6.2.9200.0 (Win32NT)
    Common Language Runtime     : 4.0.30319.18449
    System.Deployment.dll       : 4.0.30319.17929 built by: FX45RTMREL
    clr.dll             : 4.0.30319.18449 built by: FX451RTMGDR
    dfdll.dll           : 4.0.30319.17929 built by: FX45RTMREL
    dfshim.dll          : 4.0.41209.0 (Main.041209-0000)

SOURCES
    Deployment url          : file:///C:/Users/Lanboy/Downloads/Bingo%20Game.application

IDENTITIES
    Deployment Identity     : Bingo Game.application, Version=1.0.0.1, Culture=neutral, PublicKeyToken=a82aa93ff33fa9be, processorArchitecture=msil

APPLICATION SUMMARY
    * Installable application.

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of C:\Users\Lanboy\Downloads\Bingo Game.application resulted in exception. Following failure messages were detected:
        + Downloading file:///C:/Users/Lanboy/Downloads/Application Files/Bingo Game_1_0_0_1/Bingo Game.exe.manifest did not succeed.
        + Could not find a part of the path 'C:\Users\Lanboy\Downloads\Application Files\Bingo Game_1_0_0_1\Bingo Game.exe.manifest'.
        + Could not find a part of the path 'C:\Users\Lanboy\Downloads\Application Files\Bingo Game_1_0_0_1\Bingo Game.exe.manifest'.
        + Could not find a part of the path 'C:\Users\Lanboy\Downloads\Application Files\Bingo Game_1_0_0_1\Bingo Game.exe.manifest'.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [24/06/2014 19:49:15] : Activation of C:\Users\Lanboy\Downloads\Bingo Game.application has started.
    * [24/06/2014 19:49:15] : Processing of deployment manifest has successfully completed.
    * [24/06/2014 19:49:15] : Installation of the application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [24/06/2014 19:49:15] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
        - Downloading file:///C:/Users/Lanboy/Downloads/Application Files/Bingo Game_1_0_0_1/Bingo Game.exe.manifest did not succeed.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
            at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
            at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
            at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
            at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
            at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
            at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
            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.Net.WebException
        - Could not find a part of the path 'C:\Users\Lanboy\Downloads\Application Files\Bingo Game_1_0_0_1\Bingo Game.exe.manifest'.
        - Source: System
        - Stack trace:
            at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
            at System.Net.FileWebRequest.GetResponse()
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
        --- Inner Exception ---
        System.Net.WebException
        - Could not find a part of the path 'C:\Users\Lanboy\Downloads\Application Files\Bingo Game_1_0_0_1\Bingo Game.exe.manifest'.
        - Source: System
        - Stack trace:
            at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
            at System.Net.FileWebRequest.GetResponseCallback(Object state)
        --- Inner Exception ---
        System.IO.DirectoryNotFoundException
        - Could not find a part of the path 'C:\Users\Lanboy\Downloads\Application Files\Bingo Game_1_0_0_1\Bingo Game.exe.manifest'.
        - Source: mscorlib
        - Stack trace:
            at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
            at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
            at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
            at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
            at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
            at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

我在做什么错?
我错过了关键的一步吗?
是否需要将清单文件托管在服务器上并以某种方式指向它?

What am I doing wrong? Am I missing a crucial step? Do I need to host the manifest file on my server and point it to it somehow?

任何帮助将不胜感激。

Any help is greatly appreciated.

更新
根据评论和答案,我决定将发布给我的所有文件都进行发布和压缩。 zip文件夹中的文件包括:

Update As per comments and answer I decided to take all the files given to me on publish and zip them. The files in the zip folder included:

Bingo Game.application
Bingo Game.exe.config.deploy
Bingo Game.exe.deploy
Bingo Game.exe.manifest

然后上传到服务器,下载,解压缩并单击Bingo Game.application,它会失败,并出现与上面完全相同的错误。

I then re upload to the server, download, unzip and click Bingo Game.application and it fails with exactly the same error as above.

推荐答案

有几项要检查;首先,发布应用程序时是否看到以下目录结构(如果没有,则可能是您想要的结构):

There are couple of things to check; firstly, are you seeing the following directory structure when you publish your app (if not then this is the structure you probably want):

BingoGame
    Application Files
        Bingo Game_1_0_0_0
            *.deploy
            Bingo.Game.exe.manifest
        Bingo Game_1_0_0_1
            *.deploy
            Bingo.Game.exe.manifest
    Bingo.Game.Application
    setup.exe

这些文件应位于您要从中下载的服务器上(看起来确实像清单不是可疑的。)

These files should be on the server that you're downloading from (it does look suspiciously like the manifest is not).

自构建以来,没有任何文件也很重要文件已更改;如果有,并且您不希望或无法重建,请查看法师

It's also important that since the build, none of the files have changed; if they have, and you don't want to, or can't rebuild, look at mage.

这篇关于如何正确发布我的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆