I have imported images through the visual studio designer to the projects resource file. Some of these images are no longer used and I want to remove them.
However, I've tried to remove the resource images before by deleting the image file through the solution explorer and then removing the corresponding <data>
element from the .resx file. However, this causes the VS designer to have a panic attack and start throwing exceptions saying it can't find the files I've just removed even though they are not referenced anywhere.
What is the a proper way of deleting images from the resource file?
Remove a resource assignment Tip: To remove a resource from a project, on the View tab, choose Resource Sheet. Select the resource, and then press the DELETE key.
You could select the project you want to delete/close in the VS code and then click on "File" - Select "Close Folder". That should do the job. To permanently delete it from your system you could go to your storage folder and remove it from there as well. Hope this helps.
Applies to: Visual Studio Visual Studio for Mac Visual Studio Code. Resource files are files that are part of an application but are not compiled, for example icon files or audio files. Since these files are not part of the compilation process, you can change them without having to recompile your binaries.
In Solution Explorer, select the project item you want to remove. On the Edit menu, click Remove. On the confirmation dialog, click Remove to remove the item from the project.
This is a quick visual guide on removing the imported resources to Resources.resx.
You should select the resource in the resource grid and click Remove Resource
, as described in this MSDN article.
Click on the Image or BackgroundImage property to show the Select Resource dialog for the control. Select the image from the list. Select the Clear button under Local Resource. Select Okay to close the dialog.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With