在桌面应用程序使用.NET的核心 [英] Using .NET Core on Desktop Application

查看:197
本文介绍了在桌面应用程序使用.NET的核心的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C#在启动服务器的发展,我想用.NET的核心,因为它是说的多平台,我可能有兴趣在Linux上运行它。

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.

我安装了DNX的CoreCLR,因为它是在这里说: http://dotnet.readthedocs.org/en/latest/getting-started/installing-core-windows.html

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

不过,我想目标在.NET核心直接从Visual Studio,我没有任何选择这样做。

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

我编码一个典型的桌面控制台应用程序,而不是一个ASP.NET之一,但在.NET基金会GitHub的一些例子是基于控制台应用程序,所以我想这不是一个问题。

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

有一个人成功地安装并针对.NET核心,如果是这样,怎么样?提前
谢谢

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

推荐答案

有关,你需要做的VS 2015以下内容:
文件 - >新建项目 - >(的Visual C#) - >基于Web>控制台应用程序。我猜你的Windows下创建一个控制台应用程序。它运行在经典的CLR(不CoreCLR)

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)

另外,如果你想确保应用程序在CoreCLR之上运行时调试它,然后右键单击顶部该项目 - >属性 - >应用程序选项卡 - >和平台中选择.NET芯下(仅适用于网络下创建的项目 - >控制台应用程序)

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

这篇关于在桌面应用程序使用.NET的核心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆