Resources folder Win32 in Visual Studio 2012

When running the sample project in Visual Studio 2012 I can see the Resources folder under the HelloCpp project. When I created a new project and ran the Win32 version it runs but I don’t see any Resources folder under my project folder listing. I see the default Hello World cocos2dx background picture but how does project know of its location. I tried linking the Resources folder but it is still not showing.

Anyone has any idea how to make the Resources show up under Visual Studio project.

For example, if your project name is HelloWorld and the project path is E:2d-x-HelloWorld, then you can find them under
E:2d-x-HelloWorld\HelloWorld\Resources
folder. Good luck!

Hi Shiqing,

Thank you for your response. I know where the Resources folder is in my physical hard drive. My question was how to add the Resources folder into Visual Studio 2012 project so it is listed in the solution explorer.

In the project’s properties under Configuration Properties->Debugging you will see the executable’s working directory is set to something like $(ProjectDir)…This is how VS knows where it is… Everything in Resources is thus accessed as if it was in the same folder as the exe.
It is a common gotcha when running the exe outside VS not to copy the contents of your Resource folder to the folder containing the exe and then puzzling why no assets will load.
Hope this is helpful!

1 Like

Hi Ron,
Sorry for my mistake. Did you mean you want to add the resources to the project?

If we want to add resource files to the project, we can open the Resources folder in Windows Explorer, select all the files, and simply drag them into the Solution Explorer. They’ll be automatically added to the project.

Hope this can help you!

Hi Craig, Shiqing,

I know how to add new assets to the Resources folder and I know where the Resources folder is physically on my hard drive. I am not getting errors related to ‘resources could not being found’.

Let me repeat my question again. How do I make the Resources folder show up in Solution Explorer inside Visual Studio 2012. Right now I have to look at the Resources folder in Windows Explorer to find the assets I am trying to use in my project. If the Resources folder was listed inside Visual Studio under the project Solution, I would not have to keep referencing a Windows Explorer window to find assets I am trying to use. See attached screenshot to see what I’m asking for.

I want to be able to look for assets by drilling into the Resources folder inside Visual Studio 2012 so I work inside the VS2012 environment. Let me know if that still does not make sense.

Hi Ron,
I’m afraid VS cannot do what you wish (As far as I know.)
You’ll just have to get used to dealing with your Resource folder in explorer. You’d have to do that any way to add/delete/move/rename assets anyway I think…

Thank you Craig for your feedback. I was hoping there was a way to add the Resources folder into the Solution Explorer in Visual Studio 2012, so I did not have to keep a Windows Explorer Window open to find asset(s) names to use in my project.

When I was in Eclipse I could the Assets folder in the project list but I like using Visual Studio for coding so I might have to keep VS and Windows Explorer open side by side.