Carlos Torrecillas
Carlos Torrecillas

Reputation: 5736

Opening the same .NET Core solution on both Mac and Windows

I've noticed differences between a .NET Core project created in Visual Studio 2015 and a .NET Core project created using dotnet new in Mac.

Considering that VS Code is obviously not the same than VS 2015, is it possible to work on the same .NET Core solution using both a Mac and a Windows machine or are the solutions/projects fundamentally different due to the .sln and .xproj needed in VS 2015?

Upvotes: 5

Views: 2613

Answers (1)

Nate Barbettini
Nate Barbettini

Reputation: 53600

This should work fine! I've successfully started .NET Core projects on Windows with Visual Studio 2015 and continued them on my Mac with Visual Studio Code 1.3+.

Visual Studio adds extra files like .sln and .xproj, but Visual Studio Code will happily ignore them. The only thing I had to do to get Visual Studio Code to recognize my solution was:

  • Install the C# extension from Microsoft
  • Open the root solution folder in Visual Studio Code
  • Open a code file somewhere in the project and check the lower-right status bar:

status bar

I first had to click a prompt in the status bar to enable C# support. Once I did that, it recognized all the projects in my solution.

Upvotes: 8

Related Questions