Click here to Skip to main content
15,889,617 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello.

Problem is with VS2013 Pro

I am trying to add a simple class to a C++ project but the wizard always reports the same error and does not add anything, but it creates the .h (not the cpp).

Error is:
C#
Failed to return new code element. Possible syntax error. New element name: "class name here"


It always creates the .h but not .cpp.

What I have tried:

Several tricks found on different websites with similar problems (reverting changes after noticing none worked)
This solution Failed to return new Code Element does not work because the mentioned files are not in project folder...
Repairing
Uninstalling and reinstalling from scratch, with SP5.
Tried adding a class (default parameterS) using the wizard or "add class" menu -that calls wizard- to some VC++ console projects, managed, unmanaged, MFC project... Same error.
Tried to delete any "big" file in project folder as suggested in Solution1. Tried to create new project and copying only minimal source code. Still reporting same error.
Restoring default settings.
Posted
Updated 19-Jul-16 5:42am
v2
Comments
Richard MacCutchan 19-Jul-16 3:34am    
New element name: "class name here"
That definitely looks like a bug in one of the template files. I suggest reporting it to Microsoft.

On link: the file name has changed. It is now a big data file. (the biggest file in the directory)

Use a unique class name and check whether the file exist, or the class is already used.
 
Share this answer
 
Hello

I "solved" the problem.

I uninstalled VS2013 and performed a deep cleaning, very deep cleaning removing all the folders, looking for any not-evident folder, desinstaling all the stuff the uninstaller left behind, removing anypackge not removed by the uninstaller, etc. and removing registry entries as much as possible. Since all the process takes hours it's not something I'm willing to do often.

Reinstalled and all is working now perfectly (I also got some intellisense issues and even with the 'undo' feature). I configured options as I use to do, not recovering them from a backup just in case...

So it's solved but I don't know how or where the problem was. Thanks for your suggestions guys.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900