多层开发时,项目的管理问题

来源:互联网 发布:灰色预测模型知乎 编辑:程序博客网 时间:2024/05/16 12:14
  • Do not create web projects, create library projects instead.

    When developing a web application, using visual studio will make the developing process a bit easier. However, it's much difficult to share web projects by a team, especially which are integrated with a source control system, since to open or compile a web project, IIS support is necessary.

    Library projects are easy to be opened or compiled, be shared by team members, and be easily integrated with source control system.

    To modify an existing web project as a library project, you can:

    • Open the project file(.csproj), find the attribute ProjectType of the VisualStudioProject/CSHARP element, modidy "Web" as "Local".
    • Delete the .webinfo file
  • Using link files when you want to share some files among several projects.

    To realize what is a link file, you can visit this page: Share a GlobalAssemblyInfo.cs among projects in a solution.

    In the above article, I said that I didn't know how to create a link file from IDE directly. But actually, it's very simple. You can find that if you are carefull enough. To add a link file for a project,

    • Right click a project's title and select Add Existing Item.
    • Browse to the proper file, and on the Open button click on the little down arrow on the button and select Link File.

 第一条的意思:创建逻辑层和数据层不要创建Web项目,创建库项目,若是Web项目,在记事本中打开.csproj文件,找到 项目类型 属性,把Web改为Local

原英文:http://www.cnblogs.com/chenglin/archive/2005/05/30/165202.html

原创粉丝点击