#rb Paul.Chipchase, Martin.Ridgers
#jira UE-212297
#rnx
### Original change
- Add a call to ::CoInitialize in FVisualStudioSourceCodeAccessor::AddVisualStudioVersionUsingVisualStudioSetupAPI. The submitted had some use case where this could be called without CoInitialize already being in scope which was causing issues.
### Additional changes
- Added a new struct FCoInitializeScope that calls ::CoInitialize in it's constructor and ::CoUninitialize in it's destructor so that we can keep things in sync and reduce deplicate code such as logging an error if the call fails.
- - Replaced all existing manual calls to ::CoInitialize/::CoUninitialize with this struct.
- ::RefreshAvailability makes serveral calls to AddVisualStudioVersionUsingVisualStudioSetupAPI which in turn will call ::CoInitialize/::CoUninitialize, if we wrap the entire method in a FCoInitializeScope then we will only initialize and destroy once and the calls inside of AddVisualStudioVersionUsingVisualStudioSetupAPI just inc/dec the internal ref count.
-- In practice, since this is all called on the GameThread some other system will have called ::CoInitialize and maintained it's reference count so this makes no difference, but if a stand alone program wanted to use this module it might help.
[CL 35048631 by Kein in ue5-main branch]
* Write PrimaryProjectPath.txt with the location of the solution, this could be different than the root depending on project gen arguments
* Update SourceCodeAccessor accordingly to get the correct path to the solution, maintaining old defaults if the PrimaryProjectPath.txt file is not found
#rnx
#jira UE-114382
[CL 25935357 by joe kirchoff in ue5-main branch]
#fyi Joe.Kirchoff
Original CL Desc
-----------------------------------------------------------------
UnrealBuildTool: Fix failure to open/browse to source file in Visual Studio
* Always update PrimaryProjectName.txt when a project specific solution is generated
* -Game solution is always placed under the project directory, update SourceCodeAccessor according, this code was out of date
#rnx
#jira UE-114382
#preflight 6449c0c4401d328ad93a635b
[CL 25732405 by joe kirchoff in ue5-main branch]
This function is shared by the DTE and non-DTE code paths, so needs to be available when WITH_VISUALSTUDIO_DTE is false to avoid a linker error
#jira
[FYI] jonathan.bard, billy.beanland
#rnx
[CL 25675909 by jamie dale in ue5-main branch]
https://jira.it.epicgames.com/browse/UE-177285
#ushell-cherrypick of 24250895 by UnrealBot
#preflight 6453cea61c2846595c68cbf1
#rb tim.smith
[CL 25336010 by MalikuMane in ue5-main branch]
* Always update PrimaryProjectName.txt when a project specific solution is generated
* -Game solution is always placed under the project directory, update SourceCodeAccessor according, this code was out of date
#rnx
#jira UE-114382
#preflight 6449c0c4401d328ad93a635b
[CL 25209946 by Joe Kirchoff in ue5-main branch]
Removed redundant private include paths from build.cs files.
Fixed include paths to be relative to the private or public folders.
Hid or removed includes that reached into other private module folders.
Updated PublicInclude paths when necessary.
#jira
#preflight 631b93c6967ffc68fb2c32df
[CL 21935609 by bryan sefcik in ue5-main branch]
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485
[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
Note: _MSC_VER is still 1929 with the VS2022 preview, I expect it to be 1930 eventually when the compiler version is bumped which should match the versioning scheme for every other VS release
#rb none
#preflight 60d0c0d878c3b00001e335d9
#ROBOMERGE-SOURCE: CL 16730633 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16730641 by joe kirchoff in ue5-release-engine-test branch]