Friday, February 17, 2017

Submitting a Headless App to the Windows Store

I recently ran across an issue when submitting a headless app for Windows 10 IoT Core to the Windows Store.

Basically, you have to include a dummy UWP app in the solution so you can pass the automated Store checks.  In my case, I was greeted with a nice message:

"An executable image named '<APPNAME>.winmd could not be found in <C:\Projects\<APPNAME>\obj\x86\Release\ilc\in".

Posting in forums didn't come up with anything, so I ended up opening a support incident, which yielded a simple workaround:

Add the EXE to a folder in the solution and it will build (instead of at the root like the instructions state).
In the Package.appxmanifest, ensure you specify the folder in the Application node:
    <Application Id="App" Executable="EXE\DummyApp.exe" EntryPoint="DummyApp.App">

In my case, the blank UWP app is in a folder named "EXE".  I also specified "Copy to Output Directory" as "Copy Always"

Update:  I figured I should post a little bit more context.  This is the guidance for publishing IoT Core apps to the Windows Store to have it update your apps automatically.  To submit the app, it must be compiled in Release mode.  Release compiles with a checkbox enabled called "Compile with .NET Native tool chain", which appears to have a bug when you include an EXE at the root of a project.

The best part is that the only reason to do all of this is to pass the automated submission checks.  

No comments:

Post a Comment