简体   繁体   中英

File Icons are missing in Visual Studio 2015 Solution Explorer Tree View

We have registered templates with our own file extensions (*.inbp, *.indp) in Visual Studio. Unfortunately, the icons of file extensions are not shown in the tree view of the Solution Explorer in Visual Studio 2015. In Visual Studio 2012 the icons are shown, when we registered them as regular Windows filetype extensions in the registry, but in Visual Studio 2015 they do not.

Comparison of Solution Explorers in Visual Studio 2012 and 2015

We tried now to register the icons over the XML-Tag <Icon> in the .vstemplate-file, which we installed in Visual Studio 2015, but the icons are still not shown in Solution Explorer.

Are there any other methods, that the icons are shown ? Or could this be a bug in Visual Studio 2015?

Thanks for your help Tom

To show icons of associated files in Visual Studio they are reqired to be reigstered as a file extension in the windows sytem (see Create registry entry to associate file extension with application in C++ ).

The problem of we had is very specific. Because the extension we used, is installed in the userprofile of the corresponding user and the icon files are also in that directory, we registered it with the path:

%USERPROFILE%\\AppData\\Local\\Microsoft\\VisualStudio\\14.0\\Extensions......

Now the problem is, that Visual Studio 2015 is mostly not started within the corresponding user account, it is started under system or administrator account respectively. That's why the placeholder %USERPROFILE% does not point to the user directory and the icon file cannot be found in Visual Studio 2015.

As the windows explorer as well as Visual Studio 2012 run under the corresponding user, the %USERPROFILE% has the right directory stored , the icon file can be found and is shown in the file and solution explorer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM