VanDyke was born on December 12, 1972 in Midland, Texas. The following year, his family moved to Bozeman, Montana. VanDyke earned his Bachelor of Science, with highest honors, from Montana State University in 1997 and a Master of Arts in 2000. He received his Juris Doctor, magna cum laude, from Harvard Law School, where he was an editor of the Harvard Law Review. After graduating from law school, VanDyke served as a law clerk to Judge Janice Rogers Brown of the United States Court of Appeals for the District of Columbia Circuit. He then worked in private practice at Gibson, Dunn & Crutcher.
From 20122013, he was an Assistant Solicitor General of Texas. He served as Solicitor General of Montana from 20132014, when he resigned to unsuccessfully run for the Montana Supreme Court. He became Solicitor General of Nevada under Attorney General Adam Laxalt in 2015, where he served until 2019. In 2019, VanDyke became a deputy Assistant Attorney General for the United States Department of Justice Environment and Natural Resources Division, where he currently works.