Unresolved external symbol errors caused by engine functions?

I have a class that inherits from UUserWidget. This class used to compile just fine before. I made 0 changes to it since it worked (to the code, I did change the comments). After I updated the visual studio integration tool (initiated from visual studio) and regenerated vs project files, it no longer builds. It gives me 92 “unresolved external symbol” errors from the .gen.cpp.obj file, all of which seems to be related to UWidget or UUserWidget functions.

Here’s the code from my class (though I feel it is not very relevant):

.h

.cpp

Examples of error messages:

unresolved external symbol “__declspec(dllimport) public: __cdecl UWidget::FFieldNotificationClassDescriptor::FFieldNotificationClassDescriptor(void)” (_imp??0FFieldNotificationClassDescriptor@UWidget@@QEAA@XZ) referenced in function "public: virtual struct UE::FieldNotification::IClassDescriptor const & __cdecl UWidget::GetFieldNotificationDescriptor(void)const " (?GetFieldNotificationDescriptor@UWidget@@UEBAAEBUIClassDescriptor@FieldNotification@UE@@XZ)

unresolved external symbol “__declspec(dllimport) private: static class UClass * __cdecl UUserWidget::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UUserWidget@@CAPEAVUClass@@XZ) referenced in function “public: static class UClass * __cdecl UUserWidget::StaticClass(void)” (?StaticClass@UUserWidget@@SAPEAVUClass@@XZ)

Can someone please help? I have no idea what the problem is.

Update:

I restored the binaries (deleted by rebuild) and I could launch the Unreal editor. I then (using the editor) added a new c++ class inheriting from UUserWidget. Now building succeeds again. Apparently, regenerating the vs files did not regenerate everything properly and it took creating a new class to get the engine to make the necessary links…