UWP项目模板提供了异常 [英] UWP project templates gives exception
问题描述
我正在使用自定义向导为UWP开发VSIX项目模板。我将Microsoft的Blank app项目导出为模板并将其包含在我的VSIX项目中。它将按预期调用WizardImplementation类。运行开始后,执行ShouldAddProjectItem
,它将异常作为"一般异常"。不知道为什么。请帮忙。
我有2个模板(用于获取用户输入和主模板的虚拟模板)和2个向导(带有UI和主向导的根向导)。下面是我的过程。
- 从虚拟模板调用root向导。
- 然后我使用Solution2从根向导添加主模板.AddFromTemplate()。
- 然后从主模板调用主向导。
完成上述过程后,执行了ShouldAddProjectItem()主向导,Solution2.AddFromTemplate()中抛出的异常。
请在此repo中找到我的示例简单演示
祝你好运,
Cole Wu
I'm developing VSIX project templates for UWP with custom wizard. I exported the Microsoft's Blank app project as template and included it in my VSIX project. It will call the WizardImplementation class as expected. After run started, and ShouldAddProjectItem executed, it gives exception as "general exception". Dont know why. Please help.
I have 2 templates (dummy template for get user inputs and main template) and 2 wizards (root wizard with UI and main wizard). Below is my process.
- Calling root wizard from the dummy template.
- Then I add the main template from the root wizard using Solution2.AddFromTemplate().
- Then calling main wizard from the main template.
After the above process, after the execution of the ShouldAddProjectItem() of the main wizard, the exception thrown in Solution2.AddFromTemplate().
Please find my sample simple demo in this repo https://github.com/mathikp/MySampleProjectTemplate
Hi mathikp,
if you want to make a multiple projects template, which does not need use template wizard, you could add a multiple projects template directly. For more information, please refer to:msdn.microsoft.com/en-us/library/ms185308.aspx
Best regards,
Cole Wu
这篇关于UWP项目模板提供了异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!