Illegal? Really?
What law?
In 2000 GWB had to wait until Gore stopped trying to steal the election before he could offer Colin Powell the position of Secretary of State, which everyone expected him to do. (Meanwhile Powell was signalling that he’d be happy to serve in a Gore administration if it came to that.)
Unfortunately, naming individuals you would appoint to office before the election is apparently illegal. Here's Title 18, Part I, Chapter 29, Section 599 of the U.S. Code:
"Whoever, being a candidate, directly or indirectly promises or pledges the appointment, or the use of his influence or support for the appointment of any person to any public or private position or employment, for the purpose of procuring support in his candidacy shall be fined under this title or imprisoned not more than one year, or both; and if the violation was willful, shall be fined under this title or imprisoned not more than two years, or both."