I am working on a old Windows 8 application which is using the ContentIndexer from Windows to build an index for a search engine in the app. It was working well until I updated my computer to the last Creators Update. I get an exception when I'm calling the AddAsync function :
var indexer = Windows.Storage.Search.ContentIndexer.GetIndexer();
await indexer.AddAsync(content);
The exception is : Exception from HRESULT: 0x80040DB4
The inner exception is null :(
For information, the exception is only raised when I am deploying my app on a computer with a Creators update. It's still working on Windows 8 and Windows 10 with previous updates.
I tried to create also a blank Windows 10 UWP app to see if the ContentIndexer is working but it failed too.
Do you any idea to fix this problem ?
Thanks
The problem is the
Stream
property of content is not available. It is strange that if you don't setStream
andStreamContentType
propety, it will work! I will report this issue to the related team. Currently one workaround to add content to indexer is that you could add index by usingIndexableContent
.For more you could refer to official code sample and select
Add app content files to be indexed
scenario.