简体   繁体   English

Visual Studio 2015解决方案资源管理器树视图中缺少文件图标

[英]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. 我们已经在Visual Studio中使用自己的文件扩展名(* .inbp,*。indp)注册了模板。 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. 不幸的是,文件扩展名的图标未在Visual Studio 2015的解决方案资源管理器的树视图中显示。在Visual Studio 2012中,当我们在注册表中将它们注册为常规Windows文件类型扩展名时,会显示这些图标,而在Visual Studio 2015中他们不。

Comparison of Solution Explorers in Visual Studio 2012 and 2015 Visual Studio 2012和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. 我们现在尝试在Visual Studio 2015中安装的.vstemplate-file中的XML-Tag <Icon>上注册图标,但是这些图标仍未显示在解决方案资源管理器中。

Are there any other methods, that the icons are shown ? 还有其他显示图标的方法吗? Or could this be a bug in Visual Studio 2015? 还是这可能是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++ ). 要在Visual Studio中显示关联文件的图标,要求将它们注册为Windows系统中的文件扩展名(请参阅在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...... %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. 现在的问题是, Visual Studio 2015大多没有在相应的用户帐户中启动 ,而是分别在系统或管理员帐户下启动 That's why the placeholder %USERPROFILE% does not point to the user directory and the icon file cannot be found in Visual Studio 2015. 这就是占位符%USERPROFILE%不指向用户目录并且在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. 由于Windows资源管理器以及Visual Studio 2012 在相应的用户下运行,%USERPROFILE%已存储了正确的目录 ,可以找到图标文件,并在文件和解决方案资源管理器中显示该图标文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2015 - 缺少解决方案资源管理器分支中的内容 - Visual Studio 2015 - missing content in solution explorer branches 在 Visual Studio 2015 (à la SharpDevelop) 中测试资源管理器树视图? - Test explorer tree view in Visual Studio 2015 (à la SharpDevelop)? VS 2015解决方案资源管理器文件图标 - VS 2015 Solution Explorer File Icons Visual Studio 2015 跳转列表图标丢失 - Visual Studio 2015 Jump List Icons Missing Team Explorer Visual Studio 2015缺少排除 - Team Explorer Visual Studio 2015 missing Exclude Visual Studio 2015中的解决方案资源管理器菜单缺少jspm软件包和config.js - Solution explorer menu in Visual Studio 2015 is missing jspm packages and config.js 对于.cs文件,Visual Studio 2015解决方案资源管理器中的虚线文件图标的含义是什么? - What is the meaning of the dotted file icon in Visual Studio 2015 Solution Explorer for a .cs File? Visual Studio 2015解决方案资源管理器不刷新文件? - Visual studio 2015 solution explorer doesn't refresh files? 在Visual Studio 2015中更改解决方案资源管理器工具窗口的标题 - Changing the title of the Solution Explorer tool window in visual studio 2015 Visual Studio 2015项目存在,但不再显示在解决方案资源管理器中 - Visual Studio 2015 Project exists but no longer shown in Solution Explorer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM