views:

75

answers:

2

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

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?

+1  A: 

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.

Herb Caudill
A: 

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.

math_dsl