2015-08-26 49 views
2

我正在尝试将一个supportedOS标记添加到单击一次应用程序清单。为常规应用程序执行此操作的常用方法是将app.manifest文件添加到包含supportedOS标记的项目中,如下所示。我删除了一次已经包含在自动生成的点击中的所有内容。通常,一次点击应用程序不需要app.manifest,因为在发布步骤中会自动为您生成一个。如何将supportedOS添加到Windows单击应用程序清单?

<?xml version="1.0" encoding="utf-8"?> 
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
    <application> 
     <!-- Windows 7 --> 
     <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" /> 
    </application> 
    </compatibility> 
</assembly> 

到最小app.manifest添加到点击一次应用在我看来是做supportedOS标签添加到标准点击一次明显的正确方法。当我发布应用程序时,app.manifest内容会合并到生成的单击应用程序清单中。它对我来说很好。

但是,当我尝试安装点击一次应用程序,我遇到以下错误,我无法安装。

* [8/26/2015 3:30:38 PM] : Processing of deployment manifest has successfully completed. 
    * [8/26/2015 3:30:38 PM] : Installation of the application has started. 

ERROR DETAILS 
    Following errors were detected during this operation. 
    * [8/26/2015 3:30:38 PM] System.InvalidOperationException 
     - The 'EndValidation' method cannot not be called when all the elements have not been validated. 'ValidateEndElement' calls corresponding to 'ValidateElement' calls might be missing. 
     - Source: System.Xml 
     - Stack trace: 
      at System.Xml.Schema.XmlSchemaValidator.EndValidation() 
      at System.Xml.XsdValidatingReader.Read() 
      at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri) 
      at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, 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) 

重新创建:你应该能够通过任何编辑创建例如一个全新的WPF应用程序重现此错误。在项目属性页面的发布选项卡上使用发布向导添加所需的发布信息。您现在应该能够成功发布和安装。

更新:删除“登录点击一次清单”选项为EndValidation错误发生

如果不签清单似乎这个错误不会发生。发生在我身上的事情是它支持一个supportedOS标签,它工作了两次,但是当我尝试添加第三个supportedOS标签时,我遇到了Blue发布的this问题。

+ Exception reading manifest from <APPPATH>.exe.manifest: the manifest may not be valid or the file could not be opened. 
+ The element 'assembly' in namespace 'urn:schemas-microsoft-com:asm.v1' has invalid child element 'SignedInfo' in namespace 'http://www.w3.org/2000/09/xmldsig#'. 
List of possible elements expected: 'dependency' in namespace 'urn:schemas-microsoft-com:asm.v1' 

问题:谁能指点我的正确途径supportedOS信息添加到点击一次应用程序?

回答

相关问题