Given that the WINDOWS constant is meaningless (Linux mono builds as
a .net framework too, and have WINDOWS set), and that .net core builds
running on windows should execute the same actions as .net fx,
I introduced a DESKTOP flag, for standard, core and framework.
Consolidated packages versions
removed useless unsafe blocks
(cherry picked from commit 4ddf9bdf083c71e2c64874c20c0eccc9fbd1cf2a)