Cobie Smulders have been cast in Safe Haven.
The film is an adaptation of Nicholas Sparks's novel of the same name, reports Variety.
Safe Haven follows a young woman named Katie (Julianne Hough) who moves to a small North Carolina town. As she tries to keep her past a secret, she falls for two local males.
Smulders will play one of Katie's neighbours.
The How I Met Your Mother actress is coming off one of this year's biggest blockbusters, The Avengers, which has earned more than $1 billion (£623 million) at the box office worldwide.