windows - 如何在 Windows 8 中运行后台任务?

标签 windows windows-8 microsoft-metro windows-runtime

我需要你的帮助:(

我尝试激活 Windows 8 的后台任务以定期更新磁贴。 我可以找到有用的链接“http://css.dzone.com/articles/how-create-debug-background”

我在这里得到的所有东西都在下面描述。

To make background task agent, I should make another project. It would be good with 'Windows Runtime Object'.

I can make the agent by implementing interface 'IBackgroundTask'. Codes in 'IBackgroundTask.Run(IBackgroundTaskInstance taskInstance)' are regularly handled.

To make it works, I should refer 'Background Task' in .appmanifest. Entry Point is combined with namespace and the class which implements 'IBackgroundTask'.

但是,它不起作用:( 即使我正确复制了示例文件,但它根本不起作用。

我引用了包含我为此所做的解决方案文件的链接。 请给我一个帮助:)

http://sdrv.ms/UToyGu

最佳答案

“测试”项目没有对“后台服务”的引用

在Test项目中右键References -> Add Reference... -> Solution -> BackgroundService -> OK

关于windows - 如何在 Windows 8 中运行后台任务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14010639/

相关文章:

windows - 如何使用命令行从网络驱动器中提取文件名

windows - Windows任务栏右键菜单 'Close window'如何响应

windows - 在 Windows 上从 Amazon ECR 拉取镜像失败

c# - windows store app Listview 绑定(bind)

audio - 如何在Winrt中播放重叠的音频?

c# - 可以将 System.Windows.Forms 添加到 WinRT 项目吗?

windows-8 - 如何在后台任务中精确测量 CPU 使用率?

c++ - 用于在 C++ 中创建 Windows 服务的 Visual Studio 项目模板

javascript - 解析 html 字符串 Windows 8 javascript 应用程序

c# - AuthenticationToken 为空