Wednesday, April 3, 2019

Live Share in Visual Studio 2019

Finally, Visual Studio 2019 is released and one of the nice features which is generally available now with Visual Studio 2019 is Live Share.

Live Share makes it possible to share the code that you are working on right now and collaborate with fellow developers without using a separate tool. In this post, let's see how we can use Live Share.

I have some solution opened in Visual Studio 2019. There you should be able to notice this new button titled Live Share located at the top right corner.
Live Share
Once you click on that, you will see a prompt saying Visual Studio will now initiate the Live Share and your firewall will prompt to grant access to required ports. Once that is done, you will see the title of the button changed to Sharing and a link will be copied to your clipboard. 
You just need to share the link with the other user. Once he/she has the link, he/she need to open up the link in a browser.
Open Sharing
Now I am switching to my other machine and have Visual Studio 2019 installed there.

As soon as I navigate to the link from a browser, I am prompted to open the link in an application. Here the possible applications are either Visual Studio 2019 or Visual Studio Code. I am selecting Visual Studio.

Now the shared solution will get opened in Visual Studio and it's just like I have the original solution running in my machine. I can see when the other person is highlighting the code, when he is doing any changes etc, it's almost instantaneous. I can also see the email of the other user at the cursor point. So imagine there are many users connected to the session, I will see who is doing what.
And if I switch back to the machine which I initiated sharing, you can also share the terminal with participants in Read-Only or Read/Write mode.
And finally, you can end the Live Share session, and your participants will get notified.
Session Ended
Once the sharing session is ended, your participants will no longer have access to the solution.

This is a really handy feature. Do try it out.

Happy Coding.


No comments:

Post a Comment