我有一臺安裝Windows 7的機器,我想安裝我的應用程序。Clickonce WPF Windows 7 - 應用程序格式不正確。
我已經建立了一個WPF應用程序在Windows 10的.NET 4.5
先決條件和Visual C++ Redistributable Packages for Visual Studio 2013
我已經包括了他們在我的ClickOnce安裝程序的先決條件:
如果我試圖運行在Windows 7機器上從Clickonce
生成的.application
文件,我會得到以下內容摹錯誤:
Cannot Continue. The application is improperly formatted. Contact the application vendor for assistance.
不過,我在我的Windows 7計算機上運行setup.exe
它正確的提示,它需要安裝.NET 4.5
和Visual C++ Redistributable Packages for Visual Studio 2013
。然後成功完成每個先決條件的安裝過程。
除安裝了先決條件之後,我收到了與上面相同的The application is improperly formatted.
錯誤。
如果我然後重新運行.application
文件,它將最終安裝。
無論哪種方式,這絕對不是一個好的用戶體驗。這與在Windows 10上構建應用程序並嘗試在Windows 7上安裝有關嗎?
我已經看到了這個問題,這似乎是相似的,但我作爲一個先決條件安裝.NET 4.5:
Manifest may not be valid or the file could not be opened.
下面是錯誤的詳細信息:
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 2.0.50727.5420
System.Deployment.dll : 2.0.50727.5420 (Win7SP1.050727-5400)
mscorwks.dll : 2.0.50727.5420 (Win7SP1.050727-5400)
dfdll.dll : 2.0.50727.4927 (NetFXspW7.050727-4900)
dfshim.dll : 4.0.40305.0 (Main.040305-0000)
SOURCES
Deployment url : file:///C:/Users/BHS/Desktop/New%20folder/BHSScaleOps.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\BHS\Desktop\New folder\BHSScaleOps.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///C:/Users/BHS/Desktop/New%20folder/BHSScaleOps.application: the manifest may not be valid or the file could not be opened.
+ Manifest XML signature is not valid.
+ SignatureDescription could not be created for the signature algorithm supplied.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [3/21/2017 4:20:01 PM] : Activation of C:\Users\BHS\Desktop\New folder\BHSScaleOps.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [3/21/2017 4:20:01 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///C:/Users/BHS/Desktop/New%20folder/BHSScaleOps.application: 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.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
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 (SignatureValidation)
- Manifest XML signature is not valid.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Security.Cryptography.CryptographicException
- SignatureDescription could not be created for the signature algorithm supplied.
- Source: System.Security
- Stack trace:
at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key)
at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey)
at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.