Loss of UObject, leads to Crash, and now editor won't start

working with ver 5.1.1, started as blueprint ThirdPersonTemplate, and added C++ source
I have been working on making a CharacterBase inheriting ActorComponent (currently not virtual, but will be once I have polymorphism) that currently holds a CustomUObject derived class (in the CharacterBase it is marked as “Instanced, EditAnywhere”).
I got the CustomUObject class where I wanted it, and had the CharacterBase holding the pointer to it.
I as doing some debug testing on calling the CharacterBase UFUNCTIONS (fixing a few logic bugs)
this morning I opened the project through Visual studio->Build (no debugger) and the editor launched, but the CustomUObject inside my CharacterBase was now set to None. when I Saved all and closed the editor it had a member of the CustomUObject, and I couldn’t find a way to attach even a default copy of the CustomUObject.
I thought maybe I needed to recompile through the editor to get the CharacterBase at least back to default. this caused the editor to crash.
now when I try to launch the project (from Uproject directly or VS) I get a module missing, but the module that is missing is the [ProjectName] module itself (in Uproject the only module is [ProjectName] with dependancy of “Engine” and “CoreUOject”, also the only Plugin is “ModelingToolsEditorMode”)
things I have tried so far:
-launch from Uproject, same error
-close VS, “Generate Visual Studio files”, relaunch VS, Build from VS, same error
-close VS, delete sln and “vs” folder, “Generate Visual Studio files”, open VS and build, same error

what files do I need to modify/delete to remove the module missing error when the only module is the [ProjectName]?
Maybe why does the pointer to CustomUObject get set to None?

Do your target files have your project inside of Target rules?

Example: (in my case the project is called “aicpp”)

file: aicpp.Target.cs


// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class aicppTarget : TargetRules
{
	public aicppTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
		DefaultBuildSettings = BuildSettingsVersion.V2;
		IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
		ExtraModuleNames.Add("aicpp");
	}
}

You should have the files
yourProjectName.Target.cs
yourProjectNameEditor.Target.cs

You can also check your uproject file

in the same project I have

{
	"FileVersion": 3,
	"EngineAssociation": "5.1",
	"Category": "",
	"Description": "",
	"Modules": [
		{
			"Name": "aicpp",
			"Type": "Runtime",
			"LoadingPhase": "Default",
			"AdditionalDependencies": [
				"Engine",
				"AIModule"
			]
		}
	],
	"Plugins": [
		{
			"Name": "ModelingToolsEditorMode",
			"Enabled": true,
			"TargetAllowList": [
				"Editor"
			]
		},
		{
			"Name": "MovieRenderPipeline",
			"Enabled": true
		},
		{
			"Name": "PCG",
			"Enabled": true
		}
	]
}

Notice in the Modules section you should have your project segment inside
“Modules”: []

name of project is Ruins and my Targets.cs

using UnrealBuildTool;
using System.Collections.Generic;

public class RuinsTarget : TargetRules
{
	public RuinseTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
		DefaultBuildSettings = BuildSettingsVersion.V2;

		ExtraModuleNames.AddRange( new string[] { "Ruins" } );
	}
}

I was kind of able to fix the missing module by:
Deleting “.vs” “Binaries” and “DerivedDataCache” folders along with the “.sln” then “generate Visual Studio Files” again, and rebuilding from VS, and rebuilding in Editor (not sure if both are really needed…)

I am still running into the pointer to my CustomUObject keeps getting set to None now it is basically every time I exit and reload the editor.
I thought it might be that I was setting it to a local variable of the Blueprint, but even dragging it into the graph from the Hierarchy it still gets set to None on Editor reload.
I am trying to make a MVP-Repro to avoid posting large classes as this error was reported in the past (4.26-4.27) with fixes that sounded like “it decided to work now”

Are you running your project from your IDE?.
Could it be that it is not recognizing your CustomUObject and setting it to none if run just by the uproject icon?.

I’ve noticed that sometimes it needs a recompile from the IDE for the custom c++ classes to load correctly.

I was able to fix the inability to start Editor by:
in the project directory (in File Explorer) Delete the Folders for
-“.vs” *(this might not be necessary as it can skip IntelliSense needing to be completely rebuilt, but may want to try launching the .uproject and having it try to rebuild modules)
-“Binaries”
-“.sln”
Deleting these folders is safe as they are generated by the editor anyways.
-“Saved”
-“Intermediate”

Right-Click .uproject select “Generate Visual Studio Files”,
launch IDE (Visual Studio from the .sln)
build in IDE, launch Editor

my loss of the pointers is still an issue, but the scope of this question has been resolved and should be closed. (will try to get help for the loss of pointers in a separate question)