Gary Cohn, who served as President Donald Trump's top economic adviser, urged his former boss to end the partial government shutdown on Thursday.

"The government needs to be open! The government needs to be open," Cohn, the former director of the National Economic Council, told NBC News when asked what message he had for the president. "He's got to get the government open."

Speaking with MSNBC's Stephanie Ruhle at the World Economic Forum in Davos, Switzerland, Cohn also argued that immigration is necessary to grow the economy.

“We need immigration in the United States, we need legal immigration in the United States," he said. “Look at where we are in the United States right now: We have over 7 million job openings, we have less than 7 million unemployed people in the United States. If we want to continue to grow our economy, there’s only one way to do it — allow immigrants in the country.”

Cohn, the wealthy former president of Goldman Sachs, left the White House last year after the president announced a set of steel and aluminum tariffs that Cohn opposed. He was replaced by Larry Kudlow.

On Thursday, Cohn said the tariffs were a tax on Americans.

"It's a consumption tax on U.S. consumers. No foreign company is paying that tariff. Who's paying that tariff is a U.S. consumer is paying that tariff when they buy a product that is imported from overseas," he said. "What does that mean? It means that the U.S. consumer has less money to spend on other products in the United States or, even worse, they have less money to save at the end of the week because they had to spend that money on tariffs."