Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding an image to a project in Visual Studio

I added a folder to my project by right clicking on the project and adding a new folder. Now I added the image to the folder (using copy paste in Windows File Explorer), but the solution explorer is not showing my added image. I did refresh the solution as well.

Also, in that folder, there is no option of adding an image, only Visual Studio files (new items etc)..

Why isn't Solution Explorer showing my image?

like image 683
DextrousDave Avatar asked Mar 18 '13 10:03

DextrousDave


People also ask

How do I add an image to a resource in Visual Studio 2019?

Add Image Resource In Visual Studio, click the Project menu, and select Add Existing Item. Find and select the image you want to add to your project. In the Solution Explorer window, right-click the image file you just added to your project, and select Properties from the popup menu.

How do I insert a picture into Visual Studio 2010?

You can add the file to your project by choosing Add Existing Item from the project menu. Then, in properties for the file (hit F4), choose that Build Action should be "Embedded Resource". Then your file will be embedded in the assembly.


1 Answers

  • You just need to have an existing file, open the context menu on your folder , and then choose Add => Existing item...

    enter image description here

  • If you have the file already placed within your project structure, but it is not yet included, you can do so by making them visible in the solution explorer

    enter image description here

and then include them via the file context menu enter image description here

like image 129
DerApe Avatar answered Oct 04 '22 19:10

DerApe