“初始化与项目的交互"Visual Studio 2019 中的 .Net Core 项目缺失 [英] "Initialize interactive with Project" is missing for .Net Core Projects in Visual Studio 2019

查看:29
本文介绍了“初始化与项目的交互"Visual Studio 2019 中的 .Net Core 项目缺失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 VS 2019 中,当面向 .NET Core 时,缺少在 C# 交互式控制台上初始化项目的选项.

In VS 2019 the option to initialize projects on the C# Interactive console is missing when targeting .NET Core.

VS 2017 中也缺少该选项,并且 VS 2017 有一个相关问题.但是,此问题的答案主要确认了该问题,但并未提供解决方案.

The option is also missing in VS 2017 and there is a related question for VS 2017. However the answer to this question mainly confirms that issue but is not offering a solution.

有谁知道是否存在技术限制,因此此功能对于 .NET Core 根本不可行?任何人都有一个很好的解决方法来手动初始化项目(使用完整的上下文)?

Does anyone knows if there is a technical limitation and therefore this feature is simply not feasible for .NET Core? Anyone having a good workaround to still initialize the project (with the complete context) manually?

推荐答案

有谁知道是否存在技术限制,因此这个特性对 .NET Core 来说根本不可行?

Does anyone knows if there is a technical limitation and therefore this feature is simply not feasible for .NET Core?

恐怕答案是否定的.

目前该选项只支持.net framework,暂时不支持.net core项目和.net standard项目.

So far this option only supports for .net framework, and not for .net core project and .net standard project temporarily.

要使此选项可用于 VS 中的 .net 核心项目,它需要项目系统和 Roslyn 的支持.目前项目的系统工作已经完成,您可以跟踪本期关注进度其余工作在罗斯林.

To get this option available for .net core projects in VS it needs support from both Project-system and Roslyn. For now the Project'system work is done, you can track this issue to follow the progress of the rest work in Roslyn.

任何有一个好的解决方法来初始化项目的人(使用完整的上下文)手动?

Anyone having a good workaround to still initialize the project (with the complete context) manually?

Go View=>Other Windows=>C# Interactive 获取窗口,并使用 #r 命令(#r "Path/MyDll.dll") 手动加载程序集.对于完整的上下文,您还需要手动加载所有引用的程序集.

Go View=>Other Windows=>C# Interactive to get the window,and use #r command(#r "Path/MyDll.dll") to load the assembly manually.For complete context,you also need to manually load all the referenced assemblies.

其实不是一个好的解决方法,在产品团队完成功能之前似乎还有一段路要走,给您带来不便,敬请谅解:-(

Actually not a good workaround, it seems there has a way to go before the product team complete the feature, sorry for the inconvenience :-(

这篇关于“初始化与项目的交互"Visual Studio 2019 中的 .Net Core 项目缺失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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