# Filters are deleted as soon as I reboot visual studio project when I add the code

**URL:** <https://forums.unrealengine.com/t/filters-are-deleted-as-soon-as-i-reboot-visual-studio-project-when-i-add-the-code/292785>\
**Category:** C++\
**Tags:** unreal-engine, filter, Visual-Studio, CPP, question\
**Created:** [September 3, 2014, 4:33pm UTC](https://forums.unrealengine.com/t/filters-are-deleted-as-soon-as-i-reboot-visual-studio-project-when-i-add-the-code/292785 "2014-09-03T16:33:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Styvak\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Styvak\_1](https://forums.unrealengine.com/u/Styvak_1)\
**Post date:** [September 3, 2014, 4:33pm UTC](https://forums.unrealengine.com/t/filters-are-deleted-as-soon-as-i-reboot-visual-studio-project-when-i-add-the-code/292785/1 "2014-09-03T16:33:34Z")

</div>

Hello,  
I have a little problem with visual studio, when I add code from Unreal Engine, Visual Studio delete my filters.  
So, how can I save my filters please ?  
Thank you in advance,  
Cordially,  
Styvak

---

<div class="post-metadata">

**Author:** ![MulleDK19](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MulleDK19](https://forums.unrealengine.com/u/MulleDK19)\
**Post date:** [September 5, 2014, 9:49pm UTC](https://forums.unrealengine.com/t/filters-are-deleted-as-soon-as-i-reboot-visual-studio-project-when-i-add-the-code/292785/2 "2014-09-05T21:49:20Z")

</div>

Don’t add code from the editor. The project is used purely for organization purposes, and the editor replaces it every time you add code.

---

<div class="post-metadata">

**Author:** ![cahitburak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cahitburak](https://forums.unrealengine.com/u/cahitburak)\
**Post date:** [October 23, 2014, 9:37pm UTC](https://forums.unrealengine.com/t/filters-are-deleted-as-soon-as-i-reboot-visual-studio-project-when-i-add-the-code/292785/3 "2014-10-23T21:37:10Z")

</div>

Adding real physical folders to directories where these filters exists and moving header and/or source files to those folders prevents this situation.

---

<div class="post-metadata">

**Author:** ![espaghetters](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@espaghetters](https://forums.unrealengine.com/u/espaghetters)\
**Post date:** [January 28, 2021, 1:37am UTC](https://forums.unrealengine.com/t/filters-are-deleted-as-soon-as-i-reboot-visual-studio-project-when-i-add-the-code/292785/4 "2021-01-28T01:37:51Z")

</div>

This is the only comment that worked for me. I had to manually add physical folders on my disk drive in order to get the filters to stay. Thanks.

---

<div class="post-metadata">

**Author:** ![cahitburak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cahitburak](https://forums.unrealengine.com/u/cahitburak)\
**Post date:** [January 29, 2021, 9:22pm UTC](https://forums.unrealengine.com/t/filters-are-deleted-as-soon-as-i-reboot-visual-studio-project-when-i-add-the-code/292785/5 "2021-01-29T21:22:10Z")

</div>

Yes. You can always add c++ class from editor. In fact; adding class to project using editor is better then adding from VS.

You can always close the editor and the VS then move your classes any physical folder created by using explorer or Mac finder. The only thing you have to do is right click on the uproject then regenerate code project(VS or XCode…etc) files. This always works.
