7

I am starting the development of a server using C# and I would like to use .NET Core as it is said multi-platform and that I might be interested on running it on Linux.

I installed the CoreCLR with DNX as it is said here: http://dotnet.readthedocs.org/en/latest/getting-started/installing-core-windows.html

However I would like to target the .NET Core directly from Visual Studio, I don't have any option to do so.

I'm coding a classic desktop console application, not an ASP.NET one, but some examples on the GitHub of the .NET Foundation are based on console application so I guess it's not a problem

Have someone managed to install and target the .NET Core, and if so, how ? Thanks in advance

J. Doe
  • 73
  • 1
  • 3

1 Answers1

3

For that you need to do the following in VS 2015: File->New Project->(Visual C#)->Web->Console Application. I guess you created a console application under "Windows". It runs on top of the classic CLR (Not CoreCLR)

Plus if you want to make sure that the application runs on top of the CoreCLR when you debug it then right click to the project -> Properties -> Application Tab -> and under "Platform" select ".NET Core" (only works for projects created under "Web" -> "Console Application")

gregkalapos
  • 3,529
  • 2
  • 19
  • 35
  • Isn't the Web tab supposed to be about ASP.NET project ? I did not install Web packages from the VS installer and so I don't have the Web tab at all – J. Doe Oct 24 '15 at 11:01
  • The template in VS2015 in definitely under web right now. This article is for VS2015 preview, but it is the same in the final version: http://www.c-sharpcorner.com/UploadFile/7ca517/Asp-Net-5-conaole-application-with-visual-studio-2015/ If you have an older VS then there is no template for that... btw. can someone explain the downvote? Is the answer wrong? – gregkalapos Oct 24 '15 at 11:04
  • Thanks for your help. As I don't have the Web tab, I believe I have to install "Microsoft Web Developer Tools" in the VS Installer (2GB !!!). Can you agree with that ? I can't find much information over the Web. I'm using VS2015 btw – J. Doe Oct 24 '15 at 11:18
  • Yes, that is what you need. – gregkalapos Oct 24 '15 at 11:27
  • Thanks you a lot for your help ! – J. Doe Oct 24 '15 at 11:28