How to simulate a sleep or wait in metro app? RRS feed

  • General discussion

  • Can someone help me with simulating few seconds delay in WinRT code ?

    The background behind this is that, I'm trying to run my unit test appx package through commandline using vstest.console.exe. When the tests are run, the package gets installed, tests performed and uninstalled. I have a need to copy over a file in appdata local before the appx folder is removed. also, this file has different extensions, so i cannot write a test case as such to copy over jus the required file.

    Also, is there a possibility to copy over the entire localappdata folder contents to an external location like documents ?

    thanks !!

    Sunday, June 22, 2014 5:38 PM

All replies

  • What is the context in which this is running? Are you trying to do this within your test package?

    For help with VS Test please post in the VS Test forum.

    To sleep or wait in a Windows Store app depends on where you are trying to do this. Is it on the UI thread or on a worker thread?

    Windows Store apps do not have direct access to arbitrary locations (such as documents) and so cannot copy their data over. From outside of the app you can do so through any normal means.


    Monday, June 23, 2014 9:47 PM