Chapter 10. Editing from Windows

Running Linux in a VM is a great solution for Windows developers who prefer to stay in their Windows development environment. Whether the VM runs on your local machine or in the cloud, you can use it to develop .NET code while keeping your Windows desktop environment undisturbed.

If you are running Linux in a “headless” configuration, that means you don’t have access to a UI for the OS. While you can edit code using vi, one of Linux’s command line–based editors, it doesn’t support IntelliSense, color coding, tree views of projects, and various other features. In short, it is quite the suboptimal environment.

Wouldn’t it be great if you could open VS Code or Visual Studio and edit the code on your Linux VM? Well, you can. You can keep and run your code in Linux while, at the same time, editing it from Visual Studio or VS Code running in Windows.

Figure 10-1 illustrates the idea.

Figure 10-1. Edit your Linux code from the Windows desktop

Within your Windows desktop environment, run your editor (any editor will work; we’ll assume you’re using VS Code) and point it to a folder that is shared between your Windows host and the Linux VM. Any changes on either side are reflected on the other, as you would expect.

Folders versus directories

In this chapter, “folder” is used when discussing the Windows environment, and “directory” is used when discussing ...

Get Transitioning to .NET Core on Red Hat Enterprise Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.