Error HRESULT E_FAIL when adding new items
-
Thursday, August 30, 2012 7:21 AM
In studio 2010. Right click to add a new item, select .h or .c++ file, click OK
and this error shows
Error HRESULT E_FAIL when adding new items
The file added does not show in the project. Quit and restart Dev Studio 2010 and the file is there
All Replies
-
Friday, August 31, 2012 6:17 AMModerator
Hi icuurd12b42,
Thanks for your post.
Can you reproduce this issue when you try a new project?
I recommend you repair Visual Studio from control panel to see if this issue can be fixed:
open your Control panel -> Programs -> Programs and Features, right click Microsoft Visual Studio 2010 -> Uninstall/Change -> repair/reinstall.
Regards,
Barry Wang [MSFT]
MSDN Community Support | Feedback to us
-
Friday, August 31, 2012 4:36 PM
In studio 2010. Right click to add a new item, select .h or .c++ file, click OK
and this error shows
Error HRESULT E_FAIL when adding new items
The file added does not show in the project. Quit and restart Dev Studio 2010 and the file is there
-
Friday, August 31, 2012 9:28 PM
Re-installing had no effect.
The problem is only for all projects but one. one works perfectly, I guess until Dev Studio will screw me over again.. To me it seems like the projects that are defective are likely corrupted in some way or another. I got a more complex project that seems to work flawlessly. But I'm really scared of using Dev Studio Now. That particular project had to be re-constructed twice until it worked flawlesly
What am I doing wrong? Is it wrong to create a new project and drop my existing files over it? Do I really need to start from scratch and create new items solely with the Add New Item/Folder feature.
The project that works, I had to Create New Items, one at a time. Copy the text from the original files and paste them in the new files. Dropping files over Dev Studio totally screwed up my structure and, eventually broke Dev Studio completely.
There has to be a way to fix this. It's obviously tied with the actions I did when adding my files to the project. There has to be some way to recover the project somehow. Are there files I can safely delete and hope Dev Studio will recreate the project without all these problems? There has to be a valid reason why the project I manually built file by file via text copy and paste works and the one I tried to create by dropping existing files over the project broke Dev Studio.
Am I expected to convert to dev studio 2010 by manually copying and pasting c++ code to new files? I doubt it.
I can't be the only one with this problem. This started on the very first project I transferred from code::blocks to Dev studio. The first project that I did not build in Dev Studio from scratch.. One hour after I got Dev Studio. I can't believe if I got into so, so, soooo so much trouble in one hour that I am the only one and that you guy never seen this sort of problem before....
Posted in another topic:
I'm getting a lot of frustrations with 2010. From the interface not working to not recognizing adding files, to removing files from my project, to ole error when adding new items to failing to compile because of a corrupted ipch... WTF is wrong with this thing. You know there was a time where simplicity was King... and how about all the files not in their real folders... Integrated version control GTFO... too many cooks in the kitchen if you ask me. And how about all the files showing one under the other unless, if your lucky, the show all files toolbar works, which it may not
I spent 3 days rebuilding a large project... Manually 'cause the thing wont allow me to drop folders on it without getting confused. 5 times until I got the setup right... hundreds of folders created manually... even now the thing does weird stuff behind my back (Files go away, excluded files are compiled). I finally have a half working setup. I cant use the Add New/Existing items because the thing crap out returning from the dialog box. I cant drop new file on the project without having to restart Dev Studio.
And I cant figure where to discuss all those other issue on this forum. I had to log the ole error when adding new file in the installation forum because there is nothing that looks like a place to report issue about all the UI problems the thing has.
If it was not for the included top notch debugger, this would go to the trash. -
Friday, December 07, 2012 9:16 PM
Hi,
just to confirm this. I have the same issues with VS2010 Ultimate. Repairing/Reinstalling does not solve the issues.
Greetings,
oliver -
Saturday, December 08, 2012 9:44 AM
Hi again,
after some testing i found that the issue is being located inside the project file filter view.
The issue arise when the filter view contains the very same filter folder names like the physical folder names. When the filter folder name is different, it does work again.
Greetings,
oliver
-
Thursday, January 10, 2013 8:38 AM
Hi,
i have the same problem. The problem occures when i add a .h or .cpp file under a Folder, such as "Header Files".
My solution was to remove the whitespace, so i renamed the Folder to HeaderFiles. Now it works fine.
I wonder why Foldernames with whitespaces makes no problems in other Projects...
Greetings

