与项目初始化交互

与项目初始化交互

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

问题描述

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

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?

推荐答案

I

到目前为止,此选项仅支持.net框架,暂时不支持.net核心项目和.net标准项目。

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.

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项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 16:01