导出 Visual Studio 模板错误:“无法读取导出的文件”
将 Visual Studio 项目导出到模板(文件/导出模板...)时,单击完成按钮时出现以下错误:
Unable to read an exported file for the following reason: The file cannot be opened with the selected editor. Please choose another editor.
When exporting a Visual Studio project to a Template (File/Export Template...) I get the following error upon clicking the Finish button:
Unable to read an exported file for the following reason: The file cannot be opened with the selected editor. Please choose another editor.
Screenshot http://img687.yfrog.com/img687/1756/templateerror.png
A Google search for this error has only led to several dead ends. There aren't any unusual file types in this project. Any ideas what could be going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过艰苦的试验和错误(从一个空项目开始,添加一个文件夹,尝试导出模板),我能够将其范围缩小到一个 Javascript 文件。碰巧,它是
prettify.js
的语言定义之一(在该网站上用于代码着色)。有问题的文件是lang-hs.js
,出于某种原因,我的计算机上的 Windows 处理此文件的方式与其他 Javascript 文件不同:当我有.js< 时,它会在记事本中打开/code> 扩展映射到 Visual Studio。
我不确定根本的解释是什么,但我已经在这上面浪费了足够的时间,并且我相信我可以在没有 Haskell 代码着色的情况下生活(!),所以我只是删除这个文件并继续。
By laborious trial and error (start with an empty project, add a folder, try to export template) I was able to narrow this down to a single Javascript file. As it happens, it's one of the language definitions for
prettify.js
(which is used on this site for code coloring). The file in question islang-hs.js
, and for some reason Windows on my machine treats this file differently from other Javascript files: It opens in Notepad, when I have the.js
extension mapped to Visual Studio.I'm not sure what the underlying explanation is, but I've already wasted enough time on this and I believe I can live without Haskell code coloring (!) so I'm just deleting this file and moving on.
看来“.cur”文件通常是此错误的罪魁祸首。我已将它们从我的项目中删除,现在导出工作正常。
Microsoft 工作人员建议查看日志文件 (../windows/system32/compmgmt.msc),但此错误不会在应用程序事件日志中生成条目。
It seems ".cur" files are often a culprit in this error. I have removed them from my project and now the exportation works correctly.
Microsoft staff suggest looking at log files (../windows/system32/compmgmt.msc) but this error does not spawn an entry into the Application EventLog.