For a .Net project, what file extensions should I exclude from source control?

烂漫一生 提交于 2019-12-04 15:08:59

From http://blog.goneopen.com/2009/06/git-excludes-for-dotnet/:

.DS_Store
._*
TestResults
*Resharper*
**.ReSharper**
**\_ReSharper.**
*.bak
*.cache
*.resharperoptions
*.suo
*.user
*.vsprops
*/TestResults
*\bin*
*\obj*
_ReSharper.*

If you use ReSharper, be sure to exclude _Resharper* folders

If you're using Subversion for source control then the VisualSVN Visual Studio plug-in will manage excludes for you automatically.

Be sure to include any third-party dlls that your project references that won't be in the GAC of your build or deployment machines. Our practice is to have a lib folder that all such dlls live in, and we add references to them from that folder. This ensures that the hintpath property in the csproj file is correct (it stores a relative path to the referenced dll).

Do not sourcecontrol bin and obj folders, as well as *.suo and *.user (if you're using Visual Studio) files.

If you feel uneasy about keeping third-party DLLs in source control, try Componento, which, granted, does not yet have a sizable components database.

As a general rule, only source control files which are required to build the application.

Murph

Generic ingores from a project folder:

*.Cache
*.user
bin
obj

And from the solution (a level up)

*.cache
_PublishedWebSites
*.suo

We've also got the following - which are instance specific config settings referenced out of generic configs (i.e. web.config for asp.net apps)

AppSettings.config
Provider.config
connections.config

There are .config.sample files that are version controlled.

You should probably set bin, obj, *.cache, *.user and *.suo as global in your subversion setup - but as this is (if memory serves) machine specific you're probably going to end up doing explicit ignores anyway

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!