Harris's first film role as an adult was 1995's "Animal Room", although he portrayed a teenager. His subsequent film work has included supporting roles in "The Next Best Thing", "Undercover Brother", and "Starship Troopers". In 2004, Harris played a fictionalized, hyper-womanising, lewd version of himself in the "Harold and Kumar" stoner comedy films "Harold & Kumar Go to White Castle". It was the shift from roles associated with his sanitized "Doogie Howser" character to the more unscrupulous and bawdy part in the Harold & Kumar franchise that liberated Harris and revitalized his acting career, leading to his now-iconic role of Barney Stinson in "How I Met Your Mother" the following year. He would go on to reprise this role in the sequels: "Harold & Kumar Escape from Guantanamo Bay," and "A Very Harold & Kumar 3D Christmas".