Skip to main content

Use your own machine with Visual Studio Online

With Visual Studio Online, you get a fully managed development environment in the cloud on demand. Recently they announced that you can also register your own machine and access it remotely through Visual Studio Code or the Visual Studio Online Web Editor.

Why would you want to do that?

Microsoft mentions the following reasons:

This is a great option for developers that want to cloud-connect an already configured work or home machine for anywhere access, or take advantage of the Visual Studio Online developer experience for specialized hardware we don’t currently support.

Let’s try it!

First make sure that you have an existing development plan:

  • Login using your company or Microsoft account
  • Check the top bar.
    • You have an existing plan? Great you can skip to the next step.

    • You don’t have an existing plan? Let’s continue…

  • Click on the Create environment button

  • The Create a new billing plan window appears. Enter the necessary details.

  • Click on Create. Now the Create an Enviroment window appears.

  • As we want to use our own machine, we can skip this step. Just click Cancel.

Now it’s time to register our machine through the CLI. First we have to download and install the CLI:

  • On Windows:
    • Install via Powershell by download and executing our script.
  • On macOS:
    • brew install microsoft/vsonline/vso
  • On Linux:
    • apt install vso

Once the CLI is installed, run ‘VSO start’. During the process, you will be asked to login through your browser.

[2020-04-17 07:09:30.147 CLI I] vso v1.0.2005.59801 (pid: 22936)
[2020-04-17 07:09:30.454 CLI I] Authenticating...
To sign in, use a web browser to open the page
https://microsoft.com/devicelogin and enter the code <CODE> to authenticate.
Would you like to run as a persistent service/daemon? [Y/n]: n
[2020-04-17 07:10:18.108 CLI I] Will run as a process
[2020-04-17 07:10:18.623 CLI I] A VSO plan is required to register your environment.
[2020-04-17 07:10:18.627 CLI I] Using VSO plan: /subscriptions/<subscriptionid>/resourceGroups/vso-rg-a7ff597/providers/Microsoft.VSOnline/plans/vso-plan-westeurope
Enter an environment name or blank to use [<MachineName>]:
[2020-04-17 07:10:27.634 CLI I] Creating your environment...
[2020-04-17 07:10:29.153 CLI I] Saving local configurations...
[2020-04-17 07:10:29.321 CLI I] Authenticating...
[2020-04-17 07:10:31.936 CLI I] Waiting for environment to become available...
[2020-04-17 07:10:38.483 CLI I] All done! Connect: https://online.visualstudio.com/environment/<environmentid>

Now if you open up Visual Studio Online, you should see your own machine:

To remove your machine again, you can use ‘VSO stop’:

[2020-04-17 07:33:47.818 CLI I] vso v1.0.2005.59801 (pid: 8792)
Shared workspace not found: True
[2020-04-17 07:33:48.524 CLI I] Authenticating...
To sign in, use a web browser to open the page
https://microsoft.com/devicelogin and enter the code <CODE> to authenticate.
[2020-04-17 07:34:34.313 CLI I] Authentication successful. Removing your environment.
[2020-04-17 07:34:35.340 CLI I] Sucessfully removed your local environment.

Popular posts from this blog

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Color B

Help! I accidently enabled HSTS–on localhost

I ran into an issue after accidently enabling HSTS for a website on localhost. This was not an issue for the original website that was running in IIS and had a certificate configured. But when I tried to run an Angular app a little bit later on http://localhost:4200 the browser redirected me immediately to https://localhost . Whoops! That was not what I wanted in this case. To fix it, you need to go the network settings of your browser, there are available at: chrome://net-internals/#hsts edge://net-internals/#hsts brave://net-internals/#hsts Enter ‘localhost’ in the domain textbox under the Delete domain security policies section and hit Delete . That should do the trick…

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.