我的应用程序通过命令行工具Mage创建ClickOnce应用程序.如果我在Windows XP 32位(Visual Studio 2008)上构建ClickOnce应用程序,并双击xxx.application文件,它工作正常.
同一个项目在Windows 7 64位(Visual Studio 2008)上运行,并且ClickOnce应用程序创建正常,但启动xx.application文件会产生错误(参见下文).
我正在使用MS-SDK 6.0A"... Program Files\Microsoft SDKs\Windows\v6.0A\Bin\mage.exe"
为什么是这样?
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.239
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.239 (RTMGDR.030319-2300)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment url : file:///C:/m4/branches/oebb2.2.0/Deployment/M4Desktop.application
IDENTITIES
Deployment Identity : M4Desktop.app, Version=2.2.0.26921,
Culture=neutral, PublicKeyToken=7825390df6ab8bb8,
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:\m4\branches\oebb2.2.0\Deployment\M4Desktop.application resulted in
exception. Following failure messages were detected:
+ Exception reading manifest from file:///C:/m4/branches/oebb2.2.0/Deployment/M4Desktop_2.2.0.26921/M4Desktop.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 * [22.12.2011 10:42:49] : Activation of
C:\m4\branches\oebb2.2.0\Deployment\M4Desktop.application has started.
* [22.12.2011 10:42:49] : Processing of deployment manifest has
successfully completed. * [22.12.2011 10:42:49] : Installation of the
application has started.
ERROR DETAILS Following errors were detected during this operation.
* [22.12.2011 10:42:49]
System.Deployment.Application.InvalidDeploymentException
(ManifestParse)
- Exception reading manifest from file:///C:/m4/branches/oebb2.2.0/Deployment/M4Desktop_2.2.0.26921/M4Desktop.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.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.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
Run Code Online (Sandbox Code Playgroud)
在我的情况下,问题是和标签processorArchitecture之间的不匹配值.<assemblyIdentity><entryPoint>
通过命令行Mage生成清单时,我没有添加-p x86选项.
包括在内置的ClickOnce应用程序的一些DLL文件x86 solution,但法师产生assemblyIdentity与processorArchitecture=x86默认.
我正在使用Windows 7 64位上的Visual Studio 2008和32位Windows XP.
请参阅下面的清单文件的相关部分.
不工作的清单
<asmv1:assemblyIdentity
name="M4Desktop.exe"
version="2.2.0.27055"
publicKeyToken="7825390df6ab8bb8"
language="neutral"
processorArchitecture="msil"
type="win32" />
<application />
<entryPoint>
<assemblyIdentity
name="M4DesktopUpdater"
version="1.0.0.0"
publicKeyToken="D2F6EAED73E3B4FE"
language="neutral"
processorArchitecture="x86" />
<commandLine
file="M4DesktopUpdater.exe"
parameters="" />
</entryPoint>
Run Code Online (Sandbox Code Playgroud)
工作清单
<asmv1:assemblyIdentity
name="M4Desktop.exe"
version="2.2.0.27055"
publicKeyToken="7825390df6ab8bb8"
language="neutral"
processorArchitecture="x86"
type="win32" />
<application />
<entryPoint>
<assemblyIdentity
name="M4DesktopUpdater"
version="1.0.0.0"
publicKeyToken="D2F6EAED73E3B4FE"
language="neutral"
processorArchitecture="x86" />
<commandLine
file="M4DesktopUpdater.exe"
parameters="" />
</entryPoint>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4984 次 |
| 最近记录: |