File not found error when first running

Feb 21, 2014 at 8:01 AM
I downloaded the code and compiled in Windows8.1 Visual Studio 2013, succeeded.
But when I hit Debug
I got the error.
First-chance exception at 0x76812EEC in Weathr.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x0638E580. HRESULT:0x80070002 The system cannot find the file specified.

The code stuck at
in FileReaderWriter.h, function
virtual concurrency::task<void> InternalRead(const std::tuple<std::tuple<>, concurrency::task_completion_event<Platform::String^>>& t)
Both 31284 and 31567 version got the same error.

Any idea?
Feb 21, 2014 at 6:15 PM
Thanks for trying this out and for providing feedback. I've received the same feedback from several others, so I'll take a moment to explain.

Visual Studio breaks into the debugger when certain exceptions are thrown (this is what is meant by a first chance exception), even if that exception is later handled. When you first run the app, it tries to read from user configuration files. Because those files do not yet exist, an exception is thrown. The app catches and handles this exception, so this behavior is expected.

To work around the issue, you can:
  1. Press Continue to pass through all of the exception messages.
  2. Uncheck the box that says 'Break when this exception type is thrown'.
  3. Run the app in Release mode.
I agree it's a bit of a pain, but just want to reassure you that it's the expected behavior.

Hope you find the rest of the sample to be useful!