WPF 浏览器应用程序未在 Visual studio 2022 上运行

问题描述 投票:0回答:1

我的 XBAP 项目可以在 Windows 11 上运行的 Visual Studio 2013 上正确运行..

但我无法使用 Visual Studio 2022 运行它(WPF 浏览器应用程序仍然存在于 Visual Studio 2022 中,我们可以添加新项目)

更新“Internet Explorer 模式”设置后,它在边缘浏览器(基于 chromuiom)上运行https://stackoverflow.com/a/70820754/2713855

错误详细信息:文件 WpfBrowserApp3.exe 的计算哈希值与清单中指定的不同

PLATFORM VERSION INFO
Windows : 10.0.22631.0 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.8.9176.0 built by: NET481REL1LAST_B
clr.dll : 4.8.9181.0 built by: NET481REL1LAST_C
dfdll.dll : 4.8.9176.0 built by: NET481REL1LAST_B
dfshim.dll : 10.0.22621.30000 (WinBuild.160101.0800)

SOURCES
Deployment url : file:///C:/Users/user/source/repos/WpfBrowserApp3/WpfBrowserApp3/bin/Debug/WpfBrowserApp3.xbap
Application url : file:///C:/Users/user/source/repos/WpfBrowserApp3/WpfBrowserApp3/bin/Debug/WpfBrowserApp3.exe.manifest

IDENTITIES
Deployment Identity : WpfBrowserApp3.xbap, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ec569a7ebac193ca, processorArchitecture=msil
Application Identity : WpfBrowserApp3.exe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ec569a7ebac193ca, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
* Online only application.
* Browser-hosted application.

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* An exception occurred while downloading the application. Following failure messages were detected:
+ File, WpfBrowserApp3.exe, has a different computed hash than specified in manifest.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
No phase information is available.

ERROR DETAILS
Following errors were detected during this operation.
* [03/02/2024 19:58:00] System.Deployment.Application.InvalidDeploymentException (HashValidation)
- File, WpfBrowserApp3.exe, has a different computed hash than specified in manifest.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, Hash hash)
at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, HashCollection hashCollection)
at System.Deployment.Application.ComponentVerifier.FileComponent.Verify()
at System.Deployment.Application.ComponentVerifier.VerifyComponents()
at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DeploymentManager.SynchronizeCore(Boolean blocking)
at System.Deployment.Application.DeploymentManager.SynchronizeAsyncWorker()

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
c# wpf clickonce xbap
1个回答
0
投票

使用 Visual Studio 2022 启动项目后,通过默认的PresentationHost.exe调用32位版本..需要将其更改为使用64位版本

在项目属性设置中,在“启动操作”部分下,选择“启动外部程序”,然后选择“C:\Windows\SysWOW64\PresentationHost.exe”。然后应用程序就可以在我的Win11上正常调试了。

© www.soinside.com 2019 - 2024. All rights reserved.