Search code examples
uwpvsixvisual-studio-templates

Exported UWP template is not running


I have created a UWP blank app in VS2017 and ran it. Its working perfectly.

enter image description here

It has x86 and Local Machine in the bar.

Then I export it by going to Project->Export Template and include the template in my VSIX. Then I installed the VSIX. Then created a project with that template. Now that project couldn't run.

enter image description here

It has ARM and Device in the bar. So that I cannot run the project. If I run the project, the below error is coming.

enter image description here

If I change to x86 manually, the project is running fine. What is the problem here? How can I set to x86 by default to my template. I have checked the project and solution files. There is no entry is available for this. Please help.


Solution

  • Found solution. There is an entry in .vstemplate file itself to set the default configuration like below.

    <TemplateContent PreferedSolutionConfiguration="Debug|x86">