For the last several months , this humdrum German car town has vied against a prettier rival , Trollhattan in Sweden , for the affections of General Motors as it deliberated about where to build its next generation of cars in Europe .