It was not until19th century that France invaded Vietnam that the Qing government decided to recognize France's suzerainty over Vietnam and cede Vietnam to France. 1954, China sent a military advisory group to assist the Viet Cong led by Ho Chi Minh in fighting against French aggression.
During this period, China assisted Vietnam with a large number of weapons and equipment, food and materials, etc. All Vietnamese officers at or above the regimental level went to China Military Academy for further study, and almost all the weapons of the Vietnamese army were provided by China.
1975 after Vietnam's reunification, due to the death of Ho Chi Minh, the successor general secretary of the Communist Party of Vietnam, Du?n, began to fall to the Soviet Union in an attempt to establish an "Indo-zhina Federation". Vietnam also began to provoke China at sea and on land, and forced China to send troops to teach Vietnam a lesson in 1979.
Extended data:
Before it became a French colony in the late Qing Dynasty, Chinese was always the official language of this country, and its customs and habits were not much different from those of Guangxi. Such a complicated and tangled relationship makes China and Vietnam have a very complicated and tangled origin.
China is a big country, Vietnam is a small country, and the China Revolution was successful before Vietnam's national independence. Therefore, China's aid became an important factor in Vietnam's later struggle against France and America.
No matter in the honeymoon period of the international communist movement or in the later separatist period, the state relations between China and Vietnam are not quite like normal state relations. You have me and I have your entanglements.
References:
Baidu Encyclopedia-Sino-Vietnamese Relations