1

First time poster here! I have a curious problem: I am making a small windows phone app using the pivot template, but when I try to launch it with my own JSON file it returns me an error (HRESULT: 0x80070002).

I tried reseting everything (start a whole new project with only my different JSON file (DataModel/SampleData.json) and I still have this same bug, so the problem must come from here.

The file can be seen in http://justpaste.it/pgit , I sent it to a validator and it tells me it is valid (also I couldn't see any syntax difference between the original file and mine).

Since I have not modified anything in the code of the main pivot template (only the "SampleData".json file), this bug should be really easy to replicate.

Best regards

TArvela
  • 135
  • 7
  • This may be the same issue you are experiencing: http://stackoverflow.com/questions/24863501/file-not-found-exception-in-windows-phone-app – momar Dec 04 '15 at 23:34
  • 2
    HRESULTs that begin 8007 are windows error codes. Error 2 is "file not found". – Eric Lippert Dec 05 '15 at 03:08
  • If you've installed Visual Studio, you should have a program called `ERRLOOKUP.exe`, probably in a path similar to `"C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools\ERRLOOK.EXE"` . Use that program to lookup any unfamiliar error codes. – Brian Dec 07 '15 at 14:23

1 Answers1

2

The first problem was that I didn't set the "Build Action" and "Copy to Output directory" in the file's properties... (I knew it would be something simple as that).

After that the file still couldn't be opened so I changed the charset of the file to Unicode [It also works with UTF-8] (it was ANSI).

Now the app lauches without problem but nothing appears on screen (but that's another problem).

Daniel Kelley
  • 7,579
  • 6
  • 42
  • 50
TArvela
  • 135
  • 7