How to use the vs2017

Hi,
I use the editor version is 4.16.2,and visual studio 2017.
now,I change the Source code editor ->visual studio 2017,because the default is visual studio 2015.
thie issue is my editor always show the loading visual studio 2017 ,like the beneath screenshot.
then I delete the old *.sln file and regenerate visual studio project files in project file

And in my vs tools ,has a problem “incomplete type is note allowed”

why?
what should I do?
Is anyone konws it ?
plsease tell me ,thank you .!!!

Delete .vs, Binaries and Intermediate folders in your Game Project.
Generate solution by opening project.
In the editor go to In the editor File->Refresh VS Project.

Btw, was project created in older version? Cause V4.15+ uses Include What You Use principle, so you have to include all the headers.

You had Visual Studio 2015 before? If you did, do this:

1 Remove Visual Studio 2017

2.Download Total Uninstaller to remove VS2015 completely with it:

3.Download and install VS2017 with these included:
https://docs.unrealengine.com/latest/images/Programming/Development/VisualStudioSetup/VS2017_SettingsNoInstaller.jpg

If not, you only had VS2017, retrieve old .sln file and delete folders I told you. Only folders should be deleted, not .sln file

no,this issue is still exists,you say include all the headers?what’s headers?
can you give me a screenshot?

Thanks a lot!
But I think the problme is the #include file.
You say " Cause V4.15+ uses Include What You Use principle, so you have to include all the headers. "
Do you know if I will use the “GetOnwer()->” what headers file should been included?
Thanks again!

Ahh I see what’s the problem. GetOwner() is method of an AActor and judging by the name (UPositionReport) your class is not AActor but UObject and what you wrote is illegal, that’s why it says error, has nothing to do with VS2017.

GetOwner() is already included when you create AActor, but you created UObject, that’s why you cannot use it. For UObject you use just GetName() such as:

FString objectName = GetName();

If you need a guidance post your code or project, cause I don’t really see why would you want name of an UObject

But,why the same code in xocde is fine?
I created this project in my mac ,then i git clone it from github.
In mac this’s fine with xcoe,I am sure the code is same.

dunno, never worked with xcode, i’m wondering how that passed too.

Now I create a class named TestC
It’s inhirt from UActorComponent

And they hanv the same problem.
Do you find something wrong ?

Hmm, strange, should work. GetOwner() is also method of UActorComponent, works for me, although I only use V4.14 and VS2015 reason being this (IntelliSense gets stupid with V4.15+ ,IWYU and their minimal engine includes with CoreMinimal.h). If you ignore it and just compile it does it compile? If it does, and gives you results, just go with that…

Or try Visual Assist instead of IntelliSense (it doesn’t make much problems as IntelliSense, and you can download trial and see if it helps)

Ok, I will try it .
finally thanks a lot!
have a nice day