我已经设法通过桌面桥将XAF应用程序放入Windows应用商店.
当用户从Windows应用商店安装我的软件然后选择卸载时,我希望他们可以选择完全卸载包括数据库在内的软件.如果他们以后决定重新安装他们就不会有任何问题?
目前,UWP卸载没有提供删除数据库的选项(甚至解释如何删除它)因此用户可能想要通过Windows资源管理器删除数据文件 - 这仍然留下一些LocalDB的实例在其中保留一个条目数据库列表.
因此,在删除数据库文件后的第二次安装中,UWP程序显示错误
"Login failed for user"
Run Code Online (Sandbox Code Playgroud)
我的连接字符串正在使用
(localdb)\mssqllocaldb
Run Code Online (Sandbox Code Playgroud)
如何自动完全删除数据库和内存?
即我可以使用什么卸载事件,我覆盖哪里?
我在桌面桥本身中看不到任何可执行代码.
目前我认为我可能需要在实际程序中输入"在卸载前运行此选项"选项.
或者作为一种解决方法,我应该为"登录失败的用户"错误编写一个清理处理程序.
我正在使用Entity Framework 6.2和.Net Framework 4.7.2
Bridge项目使用的是Windows 10,版本1809,Build 17763(Min和Target)
我试图按照Microsoft的“百年纪念项目”指示将我的应用程序的MSI安装程序转换为UWP,但遇到此错误MakeAppx.exe:
这个Windows 10不是我的开发机器。所以我出去下载Windows 10 SDK,但是现在我很好奇SDK的“一部分” MakeAppx.exe位于什么位置?还是真的需要为此下载并安装2.3 GB?
我已经将C++/Win32应用程序打包为appx,它运行正常.但是,由于某些路径不可用,我必须以某种方式确定应用程序是否作为打包的UWP应用程序运行并进行调整.
是否有一个简单的运行时检查可以确定您是否作为打包的UWP应用程序运行?
有没有办法从我的UWP应用启动powershell脚本?
我已经读到我们必须使用FullTrustProcessLauncher类,但是我不知道如何使用/实现它。
你有什么主意吗 ?
现在,我需要在我的 uwp 应用程序中执行一个 .exe 文件。我知道一个解决方案是使用 fulltrustlauncher,但我已经搜索了很多次这个解决方案,但我的编程水平似乎太低,所以我很难理解他们的解释(例如:使用 UWP 从 C# 运行 EXE
) . 那么,您如何获得此解决方案的简单示例代码?你可以分享吗?
谢谢!
我想为 Windows 应用商店创建一个上传包。对于 dev express XAF Win 应用程序,该应用程序本质上是“Hello world”。我正在使用桌面桥。
我正在按照文档创建上传包
这创建了一个文件
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage
Run Code Online (Sandbox Code Playgroud)
还有一个错误
APPX3217 SDK folder containing 'UAP.props' for 'UAP 10.0.17763.0'
cannot be located. See http://go.microsoft.com/fwlink/?LinkID=798187 for more information
Run Code Online (Sandbox Code Playgroud)
当我双击错误时,它会转到目标文件中的以下代码
<GetSdkPropertyValue Condition="'$(AppxPackagePipelineVersion)' == '$(UapBuildPipeline)'"
TargetPlatformSdkRootOverride="$(TargetPlatformSdkRootOverride)"
SDKIdentifier="$(SDKIdentifier)"
SDKVersion="$(SDKVersion)"
TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
TargetPlatformMinVersion="$(TargetPlatformMinVersion)"
TargetPlatformVersion="$(TargetPlatformVersion)"
PropertyName="WindowsSdkDir"
VsTelemetrySession="$(VsTelemetrySession)">
Run Code Online (Sandbox Code Playgroud)
我的目标是 WINdows 10,版本 1809(10.0; Build 17763) 并且也有这个作为最小版本。
该应用程序使用 .Net Framework 4.7.2
此 WPF 应用程序的 Package.appxmanifest 已设置
<uap5:Extension Category="windows.appExecutionAlias" Executable="PROGRAMNAME.exe"
EntryPoint="Windows.FullTrustApplication">
<uap5:AppExecutionAlias>
<uap5:ExecutionAlias Alias="PROGRAMNAME.exe" />
</uap5:AppExecutionAlias>
</uap5:Extension>
Run Code Online (Sandbox Code Playgroud)
但是当我尝试从命令行运行 PROGRAMNAME 时出现错误消息
"The system cannot find the file ....WindowsApps..."
Run Code Online (Sandbox Code Playgroud)
我可以转到那个 WindowsApps 目录,即使我看到了那个文件,运行它也会给我同样的错误。
我也试过
<uap3:Extension
Category="windows.appExecutionAlias"
Executable="$targetnametoken$.exe"
EntryPoint="Windows.FullTrustApplication">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="PROGRAMNAME.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
Run Code Online (Sandbox Code Playgroud)
appxmanifest win-universal-app windows-10 uwp desktop-bridge
我有一个托管应用程序服务的主机 UWP 应用程序,在其 App.xaml.cs 中,我有以下代码:private BackgroundTaskDeferral _appServiceDeferral; 私有 AppServiceConnection _appServiceConnection; 保护覆盖无效 OnBackgroundActivated(BackgroundActivatedEventArgs args) { base.OnBackgroundActivated(args); if (args.TaskInstance.TriggerDetails 是 AppServiceTriggerDetails) { _appServiceDeferral = args.TaskInstance.GetDeferral(); args.TaskInstance.Canceled += OnAppServicesCanceled; AppServiceTriggerDetails details = args.TaskInstance.TriggerDetails as AppServiceTriggerDetails; _appServiceConnection = details.AppServiceConnection; _appServiceConnection.RequestReceived += Connection_RequestReceived; _appServiceConnection.ServiceClosed += AppServiceConnection_ServiceClosed; } }
我的主机应用程序是一个 UWP 应用程序,它有时会启动一个 win32 应用程序,Win32 是一个客户端应用程序。我有以下 Win32 应用程序代码:
connection = new AppServiceConnection(); connection.AppServiceName = "MyTestCommunicationService"; connection.PackageFamilyName = Windows.ApplicationModel.Package.Current.Id.FamilyName; connection.RequestReceived += ClientConnection_RequestReceived; connection.ServiceClosed += Connection_ServiceClosed;
var status = await connection.OpenAsync().AsTask();
Run Code Online (Sandbox Code Playgroud)
在 UWP 主机应用中,我可以向 win32 应用发送消息:
if (_appServiceConnection!= null) …Run Code Online (Sandbox Code Playgroud) 我的Win32应用程序需要安装Windows资源管理器Shell扩展。
我已使用Desktop App Converter为我的应用程序生成AppX。但是转换器忽略了由应用程序的旧版安装程序安装的Shell扩展。
当它捕获到的Classes\Directory\shellex密钥时Registry.dat,密钥条目指向未捕获的CLSID。即使它确实捕获了引用的CLSID,它也指向旧版安装程序在其中安装应用程序的路径,而不是指向将要安装AppX的实际位置。
我在考虑第一次运行时由应用程序本身注册扩展。但是安装位置中的C:\Program Files\WindowsApps权限受到限制,因此regsvr32失败。
无法加载模块“ C:\ Program Files \ WindowsApps \ WinSCP_5.14.0.0_x86__2dz6xbp7ps3z2 \ DragExt64.dll”。
确保二进制文件存储在指定的路径或对其进行调试,以检查二进制文件或相关的.DLL文件是否存在问题。
访问被拒绝。
权限的确允许将文件复制到其他位置。因此,我可以将.dll复制到例如用户配置文件(C:\Users\...)并从那里注册。但这将在卸载AppX时留下.dll。
有更好的解决方案吗?
shell-extensions appx uwp desktop-app-converter desktop-bridge
我正在尝试为FullTrustProcessLauncher运行教程代码,以便从 UWP 运行桌面应用程序(正如我在从 UWP 运行 python 脚本中所问的那样 )。
源代码可在此处找到:UWP-FullTrust。我正在运行第一个示例:UWP_FullTrust_1。
它编译一切正常,但是当我运行控制台命令(单击按钮)时,我进入了行
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
这个例外:
"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
Run Code Online (Sandbox Code Playgroud)
我不会对代码进行任何更改,但是虽然它对代码作者来说很有效,但对我来说却不是。
目标版本是:10.0 内部版本:16299。CPU:x64。(或任何)VS:2017
谢谢。
c# win-universal-app uwp windows-10-universal desktop-bridge
desktop-bridge ×10
uwp ×8
winapi ×2
windows-10 ×2
xaf ×2
appx ×1
appxmanifest ×1
c# ×1
c++ ×1
launch ×1