backgroundTaskHost.exe退出,代码为1(0x1)

编程入门 行业动态 更新时间:2024-10-08 10:58:25
本文介绍了backgroundTaskHost.exe退出,代码为1(0x1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在创建一个Windows Store应用程序,该应用程序具有用于后台任务的Windows运行时组件.

I have a Windows Store application that I am creating that has a Windows Runtime Component for a background task.

该解决方案在Visual Studio中构建时没有问题,但是在触发后台任务时,该解决方案始终会失败,并显示消息程序'[4204] backgroundTaskHost.exe'已退出,代码为1(0x1)".

The solution builds with no problems in Visual Studio but when the background task is triggered, it always fails with the message "The program '[4204] backgroundTaskHost.exe' has exited with code 1 (0x1)."

对包含后台任务的项目的引用位于主项目中,并且我正在设置入口点,因此我不知道问题出在哪里.我如何获得有关程序退出原因的更多信息?

The reference to the project containing the background task is in the main project and I am setting the entry point, so I don't know what the problem is. How do I get more information as to why the program is exiting?

推荐答案

我的入口点的名称空间有误.命名空间为"App.BackgroundServices",任务为"ToastBackgroundTask".我本应该拥有App.BackgroundServices.ToastBackgroundTask的时候才拥有BackgroundServices.ToastBackgroundTask.

My namespace was wrong on my entrypoint. Namespace was "App.BackgroundServices", task was "ToastBackgroundTask". I just had BackgroundServices.ToastBackgroundTask when I should have had App.BackgroundServices.ToastBackgroundTask.

更多推荐

backgroundTaskHost.exe退出,代码为1(0x1)

本文发布于:2023-11-12 20:44:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582488.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:代码   backgroundTaskHost   exe

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!