且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio:找不到“资源文件"在要添加到项目的项目列表中

更新时间:2022-01-30 10:54:11

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

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.