Visual Studio : can't find “resource file” in list of items to add to project

前端 未结 4 736
抹茶落季
抹茶落季 2020-12-14 14:47

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

Have I missed something ? Do I nee

相关标签:
4条回答
  • 2020-12-14 14:52

    Visual Studio Express editions do not support Resource View's. It is commonly recommended that you make your way to the Visual Studio Community editions to take full advantage of such features.

    Here is the MSDN link that notes the feature not being supported.

    Additionally, maybe you can try this:

    Right click your project and go to properties >

    Click 'Resources' > and then you may see:

    "This project does not contain a default resources file. Click here to create one."

    0 讨论(0)
  • 2020-12-14 14:59

    Some Visual Studio 2017 and 2019 workloads apparently don't include this feature, notably the ASP.NET workload. The solution, as detailed here, is to run the Visual Studio Installer and add the desktop development workload.

    0 讨论(0)
  • 2020-12-14 15:03

    Using VS 2015 Enterprise Edition, had this problem when I downloaded from our Git repository at work. Nobody knew what happened to those ".resx" files. I edited in Notepad++ the other (not missing ones) .resx files and found they all had the very same content. So I created new .resx files from scratch with that same content, reopened the solution and Build and Rebuild Solution worked like a charm.

    0 讨论(0)
  • 2020-12-14 15:06

    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:

    • Build Action: Embedded resource
    • Custom tool: ResXFileCodeGenerator (or PublicResXFileCodeGenerator to generate a designer class with public visibility)

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

    0 讨论(0)
提交回复
热议问题