大网数据广告活动
Web服务器与PHP

Troubleshoot project templates and item templates

· 52CE 我爱测

Learn how to troubleshoot templates when they fail to load in the development environment.

Applies to: Visual Studio

If a template fails to load in the development environment, there are several ways to locate the problem.

Validate the vstemplate file

If the vstemplate file in a template doesn't adhere to the Visual Studio template schema, the template may not appear in the dialog box where you create new projects.

Validating the vstemplate file

  1. Locate the .zip file that contains the template.

  2. Extract the .zip file.

  3. On the File menu in Visual Studio, select Open > File.

  4. Select the vstemplate file for the template, and select Open.

  5. Verify that the XML of the vstemplate file adheres to the template schema. For more information on the vstemplate schema, see the Template schema reference section.

    [!NOTE] To get IntelliSense support while authoring the vstemplate file, add a xmlns attribute to the VSTemplate element, and assign it a value of http://schemas.microsoft.com/developer/vstemplate/2005.

  6. Save and close the vstemplate file.

  7. Select the files included in your template, right-click, and select Send to > Compressed (zipped) folder. The files that you selected are compressed into a .zip file.

  8. Place the new .zip file in the same directory as the old .zip file.

  9. Delete the extracted template files and the old template .zip file.

Enable diagnostic logging

You can enable diagnostic logging for template discovery by following the steps in the Troubleshoot template discovery (extensibility) section.

References

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 01/02/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。