Neil Patrick Harris is the latest addition to Seth MacFarlane's Western comedy, A Million Ways To Die In The West.
Seth, who co-wrote the script with his Ted writers Alec Sulkin and Wellesley Wild, will direct, produce and star as a cowardly sheep farmer whose girlfriend (Amanda) leaves him for another man.
He turns to a "mysterious and beautiful" married stranger - played by Charlize - to help him find his courage, and has to put his new-found bravery to the test when her outlaw husband (Liam) rides back into town seeking revenge.
A Million Ways To Die In The West is set for release in May 2014.
Neil, who is best known for playing womaniser Barney Stinson in the US sitcom and his cameo roles in the Harold And Kumar comedies, will next be seen in The Smurfs 2.