Visual Studio:找不到“资源文件"在要添加到项目的项目列表中 [英] Visual Studio : can't find "resource file" in list of items to add to project

查看:1020
本文介绍了Visual Studio:找不到“资源文件"在要添加到项目的项目列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS Community 2017 RC上. 我想将资源文件(.resx)添加到我的项目中,但是该项目类型未在项目中列出

I'm on VS Community 2017 RC. I'd like to add a resource file (.resx) to my project but this item type is not listed in the items

我错过了什么吗?我是否需要在Visual Studio顶部安装任何东西才能管理资源文件?

Have I missed something ? Do I need to install anything on top of my Visual Studio to be able to manage resource files ?

推荐答案

在右上角有一个搜索框,尝试在其中键入内容,看看是否能找到任何内容.

At the top right corner you have a searchbox, try typing it there and see if it finds anything.

如果没有,请在新项目对话框中选择一个文本文件,并将其扩展名更改为

If it doesn't, select a text file in the new item dialog and change its extension to

resx

它现在应该使用资源设计器打开新文件.现在打开该文件的属性窗格(在解决方案资源管理器中右键单击它),并确保它具有以下设置:

It should now open the new file with the resources designer. Now open the properties pane for that file (right click it in the solution explorer) and make sure it has the following set:

  • 构建操作:嵌入式资源
  • 自定义工具: ResXFileCodeGenerator (或PublicResXFileCodeGenerator生成具有公共可见性的设计器类)
  • Build Action: Embedded resource
  • Custom tool: ResXFileCodeGenerator (or PublicResXFileCodeGenerator to generate a designer class with public visibility)

更新: 根据克里斯发布的链接,如果您拥有Visual Studio的速成版,我的建议将无济于事.

UPDATE: According to the link Chris posted, my suggestion won't help if you have the express edition of visual studio.

这篇关于Visual Studio:找不到“资源文件"在要添加到项目的项目列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆