Secretary of State Cyrus R. Vance, saying that the Soviet Union shows no signs of ending its occupation of Afghanistan, warned yesterday that U.S. sanctions against Moscow "will remain in force until all Soviet troops are withdrawn from Afghanistan."

In the first public assertion by a Carter administration official of how long the sanctions will be in force. Vance said they will be removed only after the Soviet Union ends the occupation of Afghanistan that began Dec. 27.

U.S. officals, elaborating on Vance's remarks, said that even in the unlikely event of a Soviet pullout, the United States still will continue its boycott of the Olympic Games in Moscow this summer. The officals said Soviet failure to heed President Carter's Feb. 20 deadline for withdrawal made the U.S. decision on the Olympics irreversible because of the time needed by the United States and other countries to try to arrange alternative games elsewhere.

In a speech to the Chicago Council on Foreign Relations, Vance attempted to outline in detail the U.S. strategy for dealing with the Soviets in the wake of the Afghan incursion.

U.S. officials said his speech was directed mainly at America's West European allies and others who have complained about lack of clarity and consulation in U.S. efforts to deal with the situation in Southwest Asia. These complaints recently caused Vance to visit Europe for talks with the principal allied leaders, and U.S. officials said the Chicago speech was intended as a blueprint of administration policy.

In laying out this policy, Vance put equal stress on the need for the United States and its allies to counter Soviet actions with a unified, tough stance and on reassuring the allies that Washington is not seeking to derail the movement toward East-West detente or revive the Cold War.

"There are no signs at this time of a Soviet withdrawal," Vance said. "If anything, current signs point to the contrary. The Soviet buildup continues and permanent facilities are being constructued."

Elaborating privately on that statement, U.S. officials said the Soviets have increased their troop strength in Afghanistan by several thousand men in recent days and are putting up permanent barracks and other facilities for their forces there.

Citing that as the working premise for U.S. policy, Vance said, "This makes it all the more important . . . to manage East-West relations in ways that preserve their essential framework," while taking steps to demonstrate that the West will stand firm against Soviet moves in the Persian Gulf region and will make Moscow pay a price for adventures like its invasion of Afghanistan.

"To respond firmly to the potential threat is not to be apocalyptic; it is simply to be prudent," Vance said. He then outlined "five key objectives" that U.S. policy seeks to pursue:

Imposing "a heavy price for this aggression" through the economic sanctions ordered by Carter.

"Let me affirm today that the sanctions . . . will remain in force until all Soviet troops are withdrawn from Afghanistan, Vance said. "Let me be equally clear that when these actions cease . . . our intention is to remove the sanctions."

Encouraging Soviet withdrawal through support of efforts in the international community "to restore a neutral, nonaligned Afghan government."

"With the prompt withdrawal of Soviet troops from Afghanistan, the United States would be willing to join with Afghanistan's neighbors in a guarantee of true neutrality and of noninterference in its internal affairs," Vance said.

Managing East-West relations in ways that "preserve their essential framework" and that will allow a resumption of the movement toward detente after an Afghan solution is achieved. That, Vance said, means continuing certain negotiations in areas like arms control and honoring existing treaty commitments between the United States and the Soviet Union. e

Working with the nations of Southwest Asia -- and with other countries "to strength the security, stability and independence of the region" through economic and military aid to these countries and by strengthening the U.S. ability to respond miliarily to threats in the region.

Making "a renewed commitment to building the basic military and economic strength of America."

Vance also addressed the nervousness exhibited by some West European governments about the effects of the Afghan crisis on their relations with the Soviets. He said:

"We are not asking our allies to dismantle the framework of East-West relations.We do ask that they take measures designed to bring about the withdrawal of Soviet forces from Afghanistan and to deter the Soviets from new adventures that will produce new crises.

"Detente cannot be divorced from deterrence," Vance stressed. "To penalize aggression now is to promote peace in the future . . . For any ally to seek only the benefits of detente while leaving deterrence to others would be shortsighted and dangerous."