Can't create any new C++ classes

I recently started to work on a project in unreal engine but when i went to make a C++ class i got this error

320277-03.png

This was the output log

LogSlate: Took 0.000224 seconds to synchronously load lazily loaded font '../../../Engine/Content/Slate/Fonts/Roboto-Light.ttf' (167K)

LogSlate: WidgetSwitcher ('None') active index changed to -1

LogSlate: WidgetSwitcher ('None') active index changed to 0

LogSlate: Took 0.000237 seconds to synchronously load lazily loaded font 
'../../../Engine/Content/Slate/Fonts/Roboto-BoldCondensed.ttf' (158K)

LogSlate: WidgetSwitcher ('None') active index changed to 1

Running C:/Program Files/Epic Games/UE_4.25/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="C:/Users/User/Documents/Unreal Projects/MyProject/MyProject.uproject" -game -rocket -progress

Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.

   at System.Xml.NameTable..ctor()

   at System.Configuration.XmlUtil..ctor(Stream stream, String name, Boolean readToFirstElement, 

ConfigurationSchemaErrors schemaErrors)
   at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()

   at System.Configuration.BaseConfigurationRecord.Init(IInternalConfigRoot configRoot, BaseConfigurationRecord 
parent, String configPath, String locationSubPath)

   at System.Configuration.RuntimeConfigurationRecord.Create(InternalConfigRoot configRoot, IInternalConfigRecord parent, String configPath)

   at System.Configuration.Internal.InternalConfigRoot.GetConfigRecord(String configPath)

   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)

   at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)

at 
System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)

   at System.Configuration.ConfigurationManager.GetSection(String sectionName)

   at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)

   at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()

   at System.Diagnostics.DiagnosticsConfiguration.Initialize()

   at System.Diagnostics.DiagnosticsConfiguration.get_IndentSize()

   at System.Diagnostics.TraceInternal.InitializeSettings()

   at System.Diagnostics.TraceInternal.get_Listeners()

   at System.Diagnostics.Trace.get_Listeners()

   at Tools.DotNETCommon.Log.WriteLinePrivate(Int32 StackFramesToSkip, Boolean bWriteOnce, LogEventType Verbosity, LogFormatOptions FormatOptions, String Format, Object[] Args) in 
D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\Log.cs:line 424

   at Tools.DotNETCommon.Log.TraceError(String Format, Object[] Args) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\Log.cs:line 569

   at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\Build\++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 577

LogSlate: Window 'Message' being destroyed
Message dialog closed, result: Yes, title: Message, text: Successfully added class 'MyPawn', however you must recompile the 'MyProject' module before it will appear in the Content Browser. Failed to generate project files.
Would you like to open the Output Log to see more details?
LogSlate: Window 'Add C++ Class' being destroyed

I have tried making fresh projects and i still get the same error also after i make a C++ class and restart the editior it says these errors and i am unable to open them again.
it says its made in a different version even if its a brand new project made in that version

320279-01.png

320278-02.png

Any help is appreciated thanks very much for reading and ill post if anything works as soon as possible thanks in advance

Once class files are generated UE4 regenerated VS project files and compiles the code. It does the same when you creating new peoject

UnrealBuildTool crashing and considering call stack shows it crash on XML parser means that there might be soemthing wrong with it’s confiutation file (BuildConfiguration.xml)

Try to inspect that, check XML validity you can also check if you don’t have some weird hidden character in text file using hex editor which can also trip out XML parser.

You could also try to rebuild compile code without UE4 open, Hot reload compilation always have some wierd issues sometimes so it’s worth a try, if it’s not you should get exact same error (in “Output” not “Errors”). But i don’t think thats a issue as you got same problem with frash project

Thanks for replying so quickly. I checked the buildConfiguration.xml and it was valid and also checked it with a hex editior to both of which were without errors. The errors after making a C++ class were the exact same even after I changed the BuildConfiguration. But for BuildConfiguration.xml i just used an example without anything specific in it as I’m still learning unreal and am quite clueless as to what i would need to put in there. I’m also using VS Code if that changes anything. Thanks again for even looking and taking the time to answer my question.

It was a .Net Framework problem and i had to do a clean install of windows to fix it. That’s all