简体   繁体   English

罗斯林的工作区

[英]Workspaces in Roslyn

What are the different workspaces in Roslyn and the differences between them? 罗斯林有哪些不同的工作空间以及它们之间的差异? I only know of MSBuildWorkspace and AdhocWorkspace . 我只知道MSBuildWorkspaceAdhocWorkspace How does workspace affects Roslyn analysis? 工作空间如何影响Roslyn分析? I have read that you need DnxWorkspace for MVC projects but I have not try them out yet. 我已经读过你需要DnxWorkspace用于MVC项目,但我还没有尝试过。

A Roslyn workspace is the common point where the model of the solution is accessed. Roslyn工作空间是访问解决方案模型的共同点。

The difference between workspaces is mostly just how how the solution model is built, whether it is built up from reading a file, etc. 工作空间之间的差异主要在于如何构建解决方案模型,是否通过读取文件等构建。

The MSBuildWorkspace builds a solution model for you from a msbuild solution or project file. MSBuildWorkspace从msbuild解决方案或项目文件为您构建解决方案模型。

The AdhocWorkspace requires you to manually build up the solution via API calls adding projects and documents. AdhocWorkspace要求您通过API调用手动构建解决方案,添加项目和文档。

The DnxWorkspace builds up the solution model by reading those early dotnet core project.json files. DnxWorkspace通过读取那些早期的dotnet核心project.json文件来构建解决方案模型。

When Roslyn is used inside Visual Studio it is using a VisualStudioWorkspace that gets the solution model from the VS project system. 当在Visual Studio中使用Roslyn时,它使用VisualStudioWorkspace从VS项目系统获取解决方案模型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM