visual Studio 2019 code compiles but form designer fails code example

Example: visual studio code can't see form

Preview VS2019 until v16.4 needs a VSIX separate installation extension. 
Now you can update your Preview of VS2019 (to 16.5 or higher) and you don't
need this extension. You can do it through the menu "Help" of VS IDE.

After update go to ... Tools > Options > Environment > Preview Features and
check "Use previews of the .NET Core SDK (requires restart)" option.

Restart VS and it should work

-Edit 2020

You can install the Preview Version that will have all these and more feature
enabled. As its a preview it may be unstable but it can run side by side with
your normal version in case something is broken in preview

Credit: https://stackoverflow.com/users/5073339/izar-urdin

Tags:

Misc Example