Main.xaml seems to be wasted, getting '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1

Hi everybody,

I cannot open my main.xaml anymore, getting the error above. Trying to check contents with Notepad ++ it gets me nulls, nothing else. The size is 86 kb. Is there any way to recover it?

Best regards,

Take a look at your project.json file! you’ll possibly find an error there.

It should look something like:

1 Like

and this is what I have, it looks ok to you?

For ease of use your .json file should be in the same folder as your xaml files so you shouldnt need the full filepath. otherwise, it looks good.

Add an "id": "Test", or whatever you named your project when you first created it.

Problem here is that my file is called Main.xaml. But here it changed to Test.xaml…Main.xaml sits in the same folder, but it has NULLs, nothing else if you open it with Notepad.

Try deleting the .json file (make a backup!) and reopen your file.