开发者

Export Visual Studio Template error: "Unable to read an exported file"

开发者 https://www.devze.com 2022-12-22 22:11 出处:网络
When exporting a Visual Studio project to a Template (File/Export Template...) I get the following error upon clicking the Finish button:

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 wha开发者_开发问答t could be going on?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号