All of the above, and from my own experience.....
Establish a bedtime routine, like you would with a small child. Use the same trigger phrase, at the same time ( roughly) each night, to signal that the day is over. Stay outside with her and don't let her back in until she's produced the goods. Then put her away and don't disturb her again til morning.
And definitely use a crate at night, but leave it open during the day, so it becomes her 'den'.