0

我想在Windows Phone 8中使用ScheduledAgent运行后台任务。 所有的东西都可以正确编译,但是当我在模拟器/设备上运行应用程序时,崩溃说在Windows Phone 8中获取'System.IO.FileNotFoundException'

“ 'System.IO.FileNotFoundException' 发生在System.Windows.ni.dll”

相同的代码可以正常运行在Windows Phone 7的

对于Windows Phone 8的我使用Visual Studio 2012

对于Windows Phone 7我使用Visual Studio 2010

+0

而我们应该如何找到没有看到代码的问题? –

+1

你可能试图得到一个文件:不存在/被拼写错误等 你可以在你的例外中,也许在调试模式,或尝试发布你的代码更多的细节。 – Pierpowl

回答

2

这是因为我错过了在主应用程序中添加后台代理DLL。一旦我补充说,所有似乎都很好:-)