Using .NET Core on Desktop Application

痞子三分冷 提交于 2019-12-12 07:59:46

问题


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


回答1:


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")



来源:https://stackoverflow.com/questions/33317324/using-net-core-on-desktop-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!