导出 Visual Studio 模板错误:“无法读取导出的文件”

发布于 2024-08-24 11:52:33 字数 787 浏览 2 评论 0原文

将 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.

屏幕截图 http://img687.yfrog.com/img687/1756/templateerror.png

Google 搜索此错误仅导致 几个 结束。该项目中没有任何异常的文件类型。有什么想法可能会发生什么吗?

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

宛菡 2024-08-31 11:52:33

通过艰苦的试验和错误(从一个空项目开始,添加一个文件夹,尝试导出模板),我能够将其范围缩小到一个 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 is lang-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.

泼猴你往哪里跑 2024-08-31 11:52:33

看来“.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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文