Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we add existing file to VS code solution, I am not getting 'Add existing item' option

Can we add existing file or folder to VS code solution from explorer itself ? One way is to add from file explorer but can this be done from VS code explorer itself like other Visual studio IDE solution explorer ?

like image 397
Rohit Avatar asked Nov 06 '25 02:11

Rohit


2 Answers

We can't add it like Visual Studio IDE as how you will always have a link to it.

However, you can "Open" a file temporarily via Cntrl+O or can open a new Window with that other folder opened.

like image 110
NanoBit Avatar answered Nov 09 '25 00:11

NanoBit


On Linux, the existing file can be inserted by copying to system's clipboard then paste from VSC.

To copy to system's clipboard:

xclip <filename>

Then paste to VSC as usual using Ctrl-V.

like image 38
Ikhlasul Amal Avatar answered Nov 09 '25 00:11

Ikhlasul Amal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!