为什么有.sln,.suo和.csproj文件? [英] Why are there .sln, .suo and .csproj files?

查看:143
本文介绍了为什么有.sln,.suo和.csproj文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用Visual Studio 2010.在完成C#程序后,我发现有 .sln 。项目根目录下的suo 文件和子目录中的 .csproj 文件。这些文件是用来做什么的?

我需要识别要放入Git存储库的文件。连同我创建的源代码/文档,我想这三个文件是唯一需要处理的文件。然而,我不知道我是否跟踪正确的文件。



ADDED



个人宏文件?我有 Emacs密钥切换宏 .sln 文件或 .csproj 文件是否具有此宏?

.sln 和 .csproj ,但不是 .suo .user 文件。



您可以将以下内容添加到 .gitignore

 #忽略由Windows创建的缩略图
Thumbs.db
#Ignore文件由Visual Studio生成
* .obj
* .exe
* .pdb
*。用户
* .aps
* .pch
* .vspscc
* _i.c
* _p.c
* .ncb
* .suo
* .tlb
* .tlh
* .bak
* .cache
* .ilk
* .log
[Bb ] in
[Dd] ebug * /
* .lib
* .sbr
obj /
[Rr] elease * /
_ReSharper * /
[Tt] est [Rr] esult *


I began to use Visual Studio 2010. After I'm done with the C# program, I see that there are .sln, and .suo files in the project root directory, and a .csproj file in the subdirectory. What are those files for?

I need to identify the files to put into a Git repository. Together with the source code/documents that I create, I guess those three files are the only one that I have to take care of. However, I'm not sure if I'm tracking the correct files.

ADDED

How about the personal macro files? I have the Emacs key switch macro, does the .sln file or .csproj file have this macro?

解决方案

You should commit the .sln and the .csproj, but not the .suo or the .user files.

You can add the following to .gitignore:

#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*

这篇关于为什么有.sln,.suo和.csproj文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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