来自appx文件夹的午餐uwp toast通知中存在问题

来自appx文件夹的午餐uwp toast通知中存在问题,uwp,wns,Uwp,Wns,我有WNS服务的uwp应用程序toast通知。在VisualStudio中使用午餐时,我的应用程序工作正常,但当我从appx文件夹运行应用程序时,不会显示toast通知。敬酒时我没有任何例外。请原谅我的语言不好 private async void ToastNotification(NotificationModel notificationModel) { string title = notificationModel.Title; string c

我有WNS服务的uwp应用程序toast通知。在VisualStudio中使用午餐时,我的应用程序工作正常,但当我从appx文件夹运行应用程序时,不会显示toast通知。敬酒时我没有任何例外。请原谅我的语言不好

private async void ToastNotification(NotificationModel notificationModel)
    {
        string title = notificationModel.Title;
        string content = notificationModel.Content;
        string image = notificationModel.ImageUrl;
        int conversationId = notificationModel.Id;
        ToastContent toastContent = new ToastContent()
        {
            Visual = new ToastVisual()
            {
                BindingGeneric = new ToastBindingGeneric()
                {
                    Children =
                    {
                        new AdaptiveText()
                        {
                            Text = title
                        },
                        new AdaptiveText()
                        {
                            Text = content
                        },

                        new AdaptiveImage()
                        {
                            Source = await DownloadImageToDisk(image)
                        }
                    },
                    AppLogoOverride = new ToastGenericAppLogo()
                    {
                        Source = await DownloadImageToDisk(notificationModel.IconUrl),
                        HintCrop = ToastGenericAppLogoCrop.Circle
                    }
                }
            },
            Actions = new ToastActionsCustom()
            {
                Buttons =
                {
                    new ToastButton("view", new QueryString()
                    {
                        { "action", "GoToLink" },
                        { "link", notificationModel.LinkAddress }

                    }.ToString())
                }
            },
            ActivationType = ToastActivationType.Background,
            Scenario = ToastScenario.Reminder
        };
        var doc = new XmlDocument();
        doc.LoadXml(toastContent.GetContent());
        var toast = new ToastNotification(doc);
        toast.Failed += (o, args) =>
        {
            var message = args.ErrorCode;
            MessageBox.Show(message.Message);
        };
        DesktopNotificationManagerCompat.CreateToastNotifier().Show(toast);
        _beharaSqlDependency.NotificationIsSent(notificationModel.Id);
    }

您好,您的意思是应用程序通常在调试状态下弹出通知,但在发布模式下(或通过安装包安装应用程序后)无法显示通知吗?你可以分享你的代码显示通知,这有助于我们分析你的问题是的,当然我没有使用安装程序,只是在调试模式和发布模式下从appx文件夹运行应用程序!在VisualStudio中运行应用程序午餐可以正常工作。您好,建议您首先通过安装程序安装桌面网桥应用程序,而不是直接从appx文件夹运行程序。安装程序可以提供弹出通知所需的AUMID。如果您没有正确弹出通知,则很可能您的应用程序AUMID与中的AUMID不匹配code@RichardZhang-MSFT嗨,我用wix工具安装软件包,工作正常,非常感谢