I have file "sample.xml" in my project set as content.
I am running this code:
Uri uri = new Uri("/sample.xml", UriKind.Relative);
StreamResourceInfo contentStream = Application.GetContentStream(uri);
Why it returns null contentStream?
I have file "sample.xml" in my project set as content.
I am running this code:
Uri uri = new Uri("/sample.xml", UriKind.Relative);
StreamResourceInfo contentStream = Application.GetContentStream(uri);
Why it returns null contentStream?
You must set file's
Build Action
as Content, andCopy To Output Directory
toCopy Always
orCopy if newer
.It means probably that it does not find the file. Is the path correct?.