Is there any way to register multiple voice command definition files with Cortana UWP?
I have an application which responds to custom cortana commands. Since the number of commands my application will respond to is large, I would like to split them up into multiple VCD files. I would like my app to respond to different CommandPrefix's as specified in each of the VCD file.
Sample VCD file 1:
<CommandSet xml:lang="en-us" Name="CustomCommands">
<CommandPrefix>Custom</CommandPrefix>
<Example> Open Website </Example>
<Command Name="CustomOpenWebsite">
<Example> Open website </Example>
<ListenFor> Open website </ListenFor>
<Feedback> Opening your website </Feedback>
<Navigate/>
</Command>
</CommandSet>
Sample VCD file 2:
<CommandSet xml:lang="en-us" Name="ReportCommands">
<CommandPrefix>My report</CommandPrefix>
<Example> Open Report </Example>
<Command Name="OpenReport">
<Example>[Can] [you] Open [the] report [please]</Example>
<ListenFor> Open report </ListenFor>
<Feedback> Opening your report </Feedback>
<Navigate/>
</Command>
<CommandSet>
I am registering both of these VCD files like this
StorageFile vcdReport = await Package.Current.InstalledLocation.GetFileAsync(@"ReportCommandDefinitions.xml");
StorageFile vcdCustom = await Package.Current.InstalledLocation.GetFileAsync(@"CustomCommandDefinitions.xml");
await VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(vcdCustom);
await VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(vcdReport);
However, this does not seem to work. Only one of the VCD files get registered and I am only able to use voice commands from one of them.