作为一个需要从这个存储库中检出并在我的计算机上运行它的人,我感到相当沮丧,因为花费了我一段时间来解决所有问题以使其能够成功编译。现在,我正在考虑编写一份Subversion指南文档,以便将它发送给公司的技术领袖,以便我们可以将流程标准化并避免这些问题的发生。
我希望得到指南方面的意见。以下是开始部分,希望我们可以从中获得好处:
有人能否看到上述建议中的错误?有什么遗漏的地方吗?是否有人对忽略列表有建议?我只是暂时加了几个条目。The file structure should be set up to have third-party libraries checked in outside the build output directories (since they won't be included in the repository.) The name of this directory should be "Libraries".
No machine-specific files should be included in Subversion. Therefore, only a template of Web.config is checked in, which is customized by the developers to suit their machine. This behavior is included in Visual Studio 2010 by default and the individual configuration files (
Web.Local.config
) automatically have the template (Web.config
) applied. The local configuration file still shouldn't be included in Subversion though, so long as it applies for a specific machine.Solution and project files must not contain any absolute paths.
An ignore list should be set up. Start with:
' *.user obj '
Example file structure for an ASP.NET 2.0 web site with a class library specific to the web site and a third-party library:
' /trunk/ Libraries/ ThirdParty.dll MyClassLibrary/ bin/ [Ignore] obj/ [Ignore] Properties/ AssemblyInfo.cs SomeClass.cs MyClassLibrary.csproj - Holds references to third-party libraries. For example: ../Libraries/ThirdParty.dll MyWebApplication/ bin/ ThirdParty.dll [Ignore; copied by build process] ThirdParty.dll.refresh - Contains "../Libraries/ThirdParty.dll" Default.aspx Default.aspx.cs Web.config [Ignore] Web.config.template MySolution.sln - Holds list of projects. - Has reference information for projects. '
An alternative to using
Web.config.template
would be to include aLocal.config
file fromWeb.config
, but this might be less flexible.When using a Web Application project rather than a Web Site project, the references will be stored in the project file instead of in .refresh files, so the bin/ folder will be ignored.
<connectionStrings configSource="ConnectionStrings.config"/>
即可。 - Troels ThomsenappSettings
和connectionStrings
... 在开发本地时,可能需要更改Web.config
文件中的许多其他部分,因此我认为我会坚持使用模板。 - Blixt