简体   繁体   English

使用 vscode 对 dotnet core 中的 sln 文件有目的吗?

[英]Is there purpose to the sln file in dotnet core using vscode?

Original unedited question:原始未经编辑的问题:

Full disclosure, I am a java developer learning dotnet core, on a mac with vscode.完全公开,我是一名 Java 开发人员,在使用 vscode 的 mac 上学习 dotnet 核心。 I get what the purpose .csporj file is, but I cant seem to find any information on why I need to maintain a .sln file.我知道.csporj文件的目的是什么,但我似乎找不到任何关于为什么我需要维护.sln文件的信息。

Ok so maybe I need to make this more explicit.好吧,也许我需要更明确地说明这一点。

I am not using Visual Studio.我没有使用 Visual Studio。 I am using vscode.我正在使用 vscode。

https://msdn.microsoft.com/en-us/library/bb165951.aspx contains no references to vscode. https://msdn.microsoft.com/en-us/library/bb165951.aspx 不包含对 vscode 的引用。 Everything I found said that the solution file was for Visual Studio, which to reiterate, I am not using.我发现的所有内容都表明解决方案文件适用于 Visual Studio,重申一下,我没有使用。 I updated the title to make this more apparent.我更新了标题以使这更明显。

So is there a purpose for the solution file in vscode?那么vscode中的解决方案文件有目的吗?

The sln is the equivalent of your eclipse work-space in Java, the csproj is the equivalent of a single java package. sln 相当于 Java 中的 eclipse 工作空间,csproj 相当于单个 java 包。 The sln is used to tie the source code for multiple assemblies together (for example a executable and its dependencies) in to a single project that can be opened as a whole. sln 用于将多个程序集的源代码(例如可执行文件及其依赖项)绑定到可以作为一个整体打开的单个项目中。

You don't need the sln if you are working with a single project (but visual studio will still want to make one when you open a csproj by itself), but if you are working with multiple csproj it is needed to keep the projects together.如果您正在处理单个项目,则不需要sln(但是当您单独打开一个 csproj 时,visual studio 仍然希望制作一个),但是如果您正在处理多个 csproj,则需要将项目保持在一起.

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

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