There are lots of method for the preparation of Isocyanide. But my self I prefer this method.
First synthesize formamide from amine using ethyl formate or formic acid in the presence of catalytic amount of triethylamine (TEA) or TsOH 10mole% ( the mechanism is different for both of catalyst). Purify using silica gel chromatography and proceed to next step for the synthesis of isocyanide.
For the synthesis of isocyanide from formamide you need dehydrating agent and there are various dehydrating agent ( triphosgene, POCl3, TsCl, phenyldicholorphosphate etc).
I prefer TsCl because its non- toxic and easy to handle compared to others. Dissolve formamide in base pyridine or TEA, add TsCl and stir at RT under inert atmospher until completion of reaction.
Best preparation of arylisocyanides - in attachment, 2,6-dimethylphenyl isocyanide is first example
Please note on reaction temperature (0oC for 2 hrs in final stage). Isocyanides are very like to phosphines as tend to oxidation (!) - argon milieu is desired