我正在使用clickonce部署应用程序,它运行良好。
构建文件夹的结构是:
不同文件夹下的所有内容都以版本号命名。
Entry Point
(.exe
文件)
通过mage.exe生成.manifest
文件和.application
到目前为止,这一切都还可以。我可以安装本地,在线安装和更新。
问题是当我更改构建文件夹的结构时,我使用1.0.0.7 我在1.0.0.7下创建一个名为“Release”的新文件夹,将所有文件移动到“Release”。(我无法发布图片,所以绘制它)
1.0.0.7
|----- Release
|----- .dll
|----- .exe
|----- ...(everything)
|----- HelloWorld.exe.manifest
使用mage.exe创建.manifest
,并更新.application
。
在我看来,它应该是有效的。每一步都与上述相同(1.0.0.0/6)。 仅添加Release
文件夹
**当我点击.application
进行安装时,我收到错误**,本地安装和在线安装,即使我在安装之前卸载旧版本。
错误:无法继续。应用程序格式不正确。联系他的应用程序供应商以获得帮助。
日志内容:
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.6.1590.0 built by: NETFXREL2
clr.dll : 4.6.1590.0 built by: NETFXREL2
dfdll.dll : 4.6.1590.0 built by: NETFXREL2
dfshim.dll : 4.0.41209.0 (Main.041209-0000)
SOURCES
Deployment url : file:///C:/job/clickOnce_pubish/HelloWorldLauncher.application
IDENTITIES
Deployment Identity : helloWorld.app, Version=1.0.0.7, Culture=neutral, PublicKeyToken=d77022dd53fe7e1e, 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:\job\clickOnce_pubish\HelloWorldLauncher.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///C:/job/clickOnce_pubish/1.0.0.7/HellowWorld.exe.manifest: the manifest may not be valid or the file could not be opened.
+ Application manifest is not semantically valid.
+ Specified <entryPoint> is not valid. Check that the path to the entrypoint is well-formed and the entrypoint exists in the deployment.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [2017/9/19 18:52:36] : Activation of C:\job\clickOnce_pubish\HelloWorldLauncher.application has started.
* [2017/9/19 18:52:36] : Processing of deployment manifest has successfully completed.
* [2017/9/19 18:52:36] : Installation of the application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [2017/9/19 18:52:36] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///C:/job/clickOnce_pubish/1.0.0.7/HellowWorld.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.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)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (ManifestSemanticValidation)
- Application manifest is not semantically valid.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForApplicationRole()
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (InvalidManifest)
- Specified <entryPoint> is not valid. Check that the path to the entrypoint is well-formed and the entrypoint exists in the deployment.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForApplicationRole()
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
我将1.0.0.7下的.manifest
与其他版本进行比较,唯一的区别是'发布'
1.0.0.6 | 1.0.0.7
------- | -------
file="HelloWorld.Desktop.exe" |commandLine file="Release\HelloWorld.Desktop.exe"
codebase="HelloWorldModule.dll"|codebase="Release\HelloWorldModule.dll"|
...|Release\...
谁能帮帮我?非常感谢。
答案 0 :(得分:0)
它可能已经过时,但你有一个简单的错误类型:
文件中的异常读取清单:/// C:/job/clickOnce_pubish/1.0.0.7/ Hello w World.exe.manifest :清单可能不是有效或无法打开文件。
检查您的脚本。它在清单名称中有多余的“w”
答案 1 :(得分:0)
我遇到了这个问题,结果证明目标体系结构与AnyCPU不匹配
要解决此问题,我必须在运行清单生成和编辑工具时添加匹配的体系结构
mage ... -Processor msil ...