Web project and source management integration in Visual Studio .NET

xiaoxiao2021-03-06  69

Web project and source management integration in Visual Studio .NET

Korby Parnell and Martyn Lovellvisual Studio Teammicrosoft Corporation 2002 Summary: This article provides a policy for web projects that develop source code management in Visual Studio .NET. table of Contents

Understanding Solutions and Projects Establishing Source Management Policy Collaboration Development Mode Select a Collaborative Development Mode: Web Project Create Background Source Code Management Integration General Tips, Note and Principles Common Problem Visual InterDev Developers Appendix A: Set Dynamics URL Web Quoting Appendix B: Change Web Access Method Appendix C: Deploying Web Project Other Information Introduction Anyone is not possible to grasp all languages, technologies, tools and methods required to create a first-class software application quickly and coherent, so large Most professional developers are developed in the form of a team. This is also required for efficiency and economic benefits. Similarly, most software development teams use parallel development methods so that single developers can be freed from "serial development"; the so-called serial development, that is, only when a developer completed the task, the next one Developers can start working. "Parallel Development" allows multiple developers to work "isolation" to develop the same or different parts and versions of a project in a safe way. To play a parallel development, the team must implement processes so that project developers can resolve them quickly, gradually, and automatically (in some cases) before the small conflict becomes a major conflict. Visual Studio .NET can improve the team's collaboration capabilities by ensuring sufficient development isolation. When isolating, two or more developers are tipped by the apricots and harmful, the downsis, the vs. V. Fresh real-Paddle floating S guanamine ⒉? Microsoft development tools are different, Visual Studio .NET now supports the true isolation development of Web and non-Web projects. This article provides a team that successfully develops ASP.NET Web projects in a team, introduces Web project file management so you easily understand how to set up, develop and deploy source-managed web applications in team's form. A reliable collaborative development strategy consists of the following factors:

The consistency isolation of the source code management program ensures successful cooperation, the easiest way to use source code management solutions, projects, and other shared resources. Source management can protect team resources will not be accidentally deleted, and changes to protect single developers will not be blind or unintentionally overwritten, and you can maintain history of all project files by version. Visual Studio .NET enables source code to become an extension of project file management, thereby reducing the complexity of source code management. You do not need to leave the integrated development environment (IDE) or open another application, you can implement all source code management operations. Understanding Solutions and Project Visual Studio reduces many monotonous and complex operations in project file management and source code management. For example, when you add new items in your project, Visual Studio can save it in a location in the storage area. As long as the file is open and compiled with the project as required, you do not need to determine the save location of the file. When developing a web application, understand how Visual Studio .NET manage project files in the background, you can save you a lot of time and money for you and your team. Solutions Create a web project from the store or open an existing Web project, the system will automatically create a solution that contains the project. All Visual Studio .NET solutions include a solution file solutionName.sln, which stores solution metadata, such as project lists, and its location in the storage area. The solution contains another Solution file solutionName.suo, which tracks user-specific information, such as the default save location of the Visual Studio project. When adding a solution to source management, only * .sln files will be added. Moreover, it will not check into the * .su file from the beginning to end. From the perspective of source code management, the following two important matters about the solutions are worth noting. The solution is local. Solutions and Web project files are stored in different locations. Unlike the file items of the web project, the solution file will never be stored on the web server unless you deliberate it on the web server (it is recommended that you don't do this). Web project files (.vbproj and .csproj) reside on the web server, and all file items in the solution file (.SLN and .SUO) and the Solution Items folder are stored by default File system folder. This is very important because it will affect the structure and manageability of the source code management web project. What happens about how to add a Web project solution to the source code management, see what will happen when adding a web project solution to source management? . Create a solution instead of a project. Create a solution first, then add a project, you can maintain the logical parent child relationship between the solution and its items in the storage area. Doing so ensures that the sewage items of the multi-project solution can also help avoid some confusing issues, which may accompany some more complex source management operations, such as branches and mergers. Projects In terms of management documents, Visual Studio .NET contains only two types of items: Web and non-Web projects (ie local projects).

Web project

All items created in the HTTP location of the New Project dialog box. These projects are mainly used to provide content to web browsers (ie, items called web applications), and can be used when developers need to share data between servers.

Local project

All items created in non-HTTP locations (eg, C: / MyProjects or // mycomputer / myprojects). The most common local project is used to create a Windows application. Like the solution file * .sln, all items contain a project file to identify the physical location of each of its various in the computer file system. For example, when you add a text file to the Visual Basic ASP.NET project, its relative path will be inserted into the project file (* .vbproj). Web Project ASP.NET Web Project is a Fast Application Development (RAD) template for web-based thin client applications. In the ASP.NET web application, the web form page provides information to the user via the browser and uses the server code to implement application logic. The web application is built around the ASP.NET, ASP.NET is a platform that contains the design-time objects and controls required to develop and run applications on the web server and runtime execution environments. When you manage the web project under source code, you need to pay attention to the following:

Perform all available source code management operations using Visual Studio .NET. Do not enforce source code management in a manual way. When using Add to Source Control or Check In command, all files managed by the source code will be automatically stored there. Access Method Visual Studio accesss and manages files on the web server through one of the following methods: file sharing, this is a new feature in Visual Studio .NET; or FrontPage, it has been used in Visual InterDev. By default, use the new file sharing access method.

File Sharing

Visual Studio uses a Windows-based file management command to access the web project file. File sharing is the default web access method, which provides good support for source code management. For more information on file sharing access methods and their impact on team development, see

File Sharing.

FrontPage

All files are managed using HTTP protocols. The source code management request from Visual Studio is forwarded to the source code management provider (e.g., Visual SourceSafe), via FrontPage Server Extensions. The source code management command supported by FrontPage Access Methods is less than the commands supported by the file sharing access method. For more information on the FrontPage Access Method, see

FrontPage Server Extensions.

The project file is different from the local project, and the web project cannot contain file items other than its project directory. When you add an existing file to a web project, Visual Studio is copied by copying the file to the Virtual Application root (virtual application root, a directory on the web server, all item items and generated output are stored here), thereby inclusion In the project. The configuration file web.config file is a special application configuration file that defines its settings when designing an application. After deployment, you can change these settings without turning off the web server. Multiple configuration files named web.config can appear in multiple directories of the ASP.NET Web application server. Each web.config file applies configuration settings (such as IIS Authentication Settings) to your own directory source file. You can create a custom profile in a Web project, override the settings in the default web.config file (for example, MySettings.config). When working in a team development environment, sometimes you need to create such files. For more information about when creating a custom profile (especially when developing a shared project), see the web reference. For web projects, web.config is the only * .config file to be added to the source code. Files that do not perform source code management Projectname.vbProj.Webinfo are special project files for logging virtual applications. Since each user's project work must contain its own virtual application root, the * .webinfo file does not appear in the Solution Explorer, nor will it be added to source management. Therefore, if you assign * .webinfo file, each developer's changes will be saved to your personal file without prior warnings. In addition to WebInfo files, Visual Studio .NET does not add specific project files to source management. Most excluded files contain user-specific settings that cannot be shared. Like * .su file, the following web project files should not be added to source management:

Generate output * .vbproj.user, *. Csproj.user * .vbproj.webinfo, *. Csproj.webinfo * .scc, .vspscc, .vsscc, etc. Contains all profiles set by users who can overwrite the standard web.config file. For example, see Appendix A: Setting up a dynamic URL web reference. All files hidden in the Solution Explorer (except aspx.vb and aspx.resx files) are bound by default. Web references, web projects, and source code management integration "Web Reference" are generated proxy classes that represent the features provided by the deployed XML Web Service. In the ASP.NET Web project, the URL represents a web reference, which can be both static or dynamic. The default value for the web reference URL property is static. When departing a web application in the team, in some cases you need to change this property to dynamic. For those solutions that use source code management and develop solutions that include ASP.NET web applications and Web Service projects, it is recommended to use dynamic URLs. In some cases, the web reference may be valid for one user and is invalid for another user. If this happens, you can use the profile to define and store the relative paths of these shared resources in your personal profile. For more information on dynamic URL web references and its creation methods, see Appendix A: Setting up Dynamic URL web references. Establishing source code management policy source code management is just a tool to work in software development. It makes parallel development easier, and it can also be developed, but it does not ensure that these two functions are implemented. A team can only discover the maximum potential of the source code management only by establishing a strategy and insisting on execution. When developing a Web project, you must choose a working method from the following categories: local host and remote host

Discuss the important difference between the local host and the remote host file sharing web project.

Web Access Method

Define and compare the FrontPage and File Sharing Access Method.

Sharing checkout

Environments that disable exclusive checkout mode so that developers can edit the same files at the same time.

Local hosts and remote hosts in a team development environment, the location of the original saved file sharing web project is critical. If you save a work replica of a web project to a subdirectory of http: // localhost, the web project will be considered as "local host project". If a copy is saved to a non-"local host" (eg http: // Teamserver / WebApplication1), the project is considered "Remote Host Project." The local host project is commissioned locally. Remote debugging remotely. But before you debug the remote host web project, you must let the member of the computer administrators group award you Debugger User permissions. In Visual Studio .NET, http: // localhost is the default location of the web project and is also recommended. At one of the following cases, you need to save the project's work copy to the remote host location:

Your PC cannot be used as an IIS web server. You need to perform pre-deployment tests and debug on the production server. In most practical conditions, the performance of the team used to deploy its web application is much more powerful than their development computers. Before deploying a web application to such a server, you can open them from the source code management (in your own computer), set the location of the working copy item in the virtual directory of the production server, then run and debug the project . On the production server, you can test time and concurrency issues, which may not be displayed on desktop computers with poor performance. Developed on a computer, then uses applications that are commissioned with another computer that is similar or identical to the production server environment, which is often easy to deploy, and the cost is low. Note: When a user starts debugging, the debug process will lock the shared web server to effectively prevent other users from using the server before stopping debugging.

Web Access Method Web Access Method Specifies how Visual Studio gets write permissions on web project files on the web. The method you have chosen has a significant impact on the WEB project managed by the source code. Always use the same web access method for each web project to avoid confusion of the team. Visual Studio provides two web access methods, "file sharing" and "frontPage". File sharing is a new feature, which is the default web access method of most Visual Studio .NET Web projects, but also the access method recommended. Document sharing This is the default access method. File Sharing web application resides in a shared network location. When you create a web application, you need to provide an HTTP address for the project, and Visual Studio resolves the address to a Unified Naming Convention (UNC) shared. The operation performed by the project will use UNC addressable network sharing; use direct file access and HTTP access by combining, editing, saving, compiling and running and running the project on the network location. When you open a Web project from source code, Visual Studio creates a copy of the master copy of the project source code management in your work folder (such as http: / localhost / webApp1). The work folder can be located on any web server, but when developing in a team, select the correct position. For more information, see Collaboration Development Mode. The figure below illustrates how many developers are in isolation, using the file sharing web access method to securely develop the master web project. Figure 1 Since each developer edits the working copy of the main control web project, the file sharing web access method supports sharing checkout. By sharing or multiple checkout, many users can edit project files simultaneously and save changes to the project files without worrying if they may override another user changes. For professional development teams, it is recommended to work in sharing or multi-check mode because it will help parallel. For details, please refer to the shared checkout for details and best examples working in sharing or multi-checkout mode. File Sharing Web Access Method is more advantageous than FrontPage because it:

Support sharing checkout. By sharing, multiple users can check out and edit any files, even if other users have signed the file. Support advanced source code management commands, such as Branch, Merge, PIN, and Label. Allow isolation. Team members can edit shared files on their personal computers, and then consolidate changes, without override the team's master copy. Use any source code management provider that is compatible with Microsoft Source Management Interface (MSSCCI). The FrontPage Access Method is only available for Visual SourceSafe. FrontPage Server Extensions You can also configure Visual Studio with FrontPage Server Extensions to access Web project files. On the server created the application, FrontPage is integrated with Visual SourceSafe. The source code management request from Visual Studio is forwarded to the server installation of Visual SourceSafe via FrontPage Server Extensions. There is a working copy when developing a FrontPage web project in Visual Studio .NET. Single version project resides on the IIS Web server, which is managed using the HTTP protocol. The figure below illustrates how two developers interact in the version controlled FrontPage Web project environment. Figure 2 Note: You cannot use Visual Studio to use Visual Studio via FrontPage Server Extensions to add the item to the source code management, you must manually add this item to the web server created.

For most applications, it is recommended that the Team does not use the FrontPage Web access method in Visual Studio. Because it is not conducive to effective parallel development. The FrontPage Web project management of source code is developed in a serial manner: a developer edits a file. However, in some cases, you must use the FrontPage Web access method. For more information, see Collaboration Development Mode.

Note: If your team is connected in a LAN or VPN mode, you can upgrade an existing web project to a new file sharing access method. For more information, see

Upgrade from FrontPage to file sharing.

Sharing Signature For most professional development teams, it is recommended to use a shared checkout (or multi-signed mode). By sharing, multiple users can check out and edit any files, even if other users have signed the file. If you are accustomed to working in exclusive checkout, the consolidation conflicts caused by shared (unable to solve overlapping changes) is less than the imagination. If a conflict occurs, the source code management provider usually provides a simple way to determine which changes need to be retained, which changes need to be givenover. If the team does use a shared checkout mode, do not use the Check In command without using the project item in the IDE, do not use the Check IN command. After obtaining the latest version from the source code management, you can merge personal changes to the version master copy (if you have changed after the last check out), save the merged items to the work folder, then test the project to ensure It still works normally. If you attempt to check into a file from the last check out without getting the latest version of the Web project, you may overwrite the work version with a corrupted version. In this case, you have two options, but both choices will not be satisfactory:

The project can be debugged on the web server. But for the ASP.NET Web project, doing this may prevent other developers from using the item before your work is completed. For more information, see the local host and the remote host. In the source code management, you can return to the normal version of the nearest host copy, and the changes to the work replica will be lost since the last check out project. This method will lead to data loss, so it is recommended that you do not use it. Alternatively, it is best to perform GET (acquisition) operation on your own computer and merge, not to perform check in and merge on the server. The source code management provider handles the shared checkout in a different way. If you are using Visual SourceSafe 6.0c, you are signed by default. To implement a shared sign in Visual SourceSafe 6.0, click the Start button, point to Programs, point to "Microsoft Visual SourceSafe", and then click Visual SourceSafe 6.0 Admin. Click Users, click Open SourceSafe Database, select the appropriate database, and then click Open. In the Tools menu, click Options. On the General tab, select Allow MultiPle Checkouts (allowing multiple checkouts), then click OK. Collaboration Development Mode For web projects, collaborative development models are determined by the following two factors, namely: Web access methods and developers of each item save their work replica. There are three main modes:

Isolation and development semi-separated unloading disconnects In this mode, each developer can edit, run, and debug, and save incremental changes to the personal work copy of the team's source code management. in. Developers save a copy of the local host location on their personal web server. Each member is indirectly interacting through the main control project of source code. Team members can handle the same files simultaneously because their source management provider can adjust all version conflicts in two ways: Automatic adjustment or prompting members to manually merge conflicts automatically. The figure below illustrates how the source code management is separated between the developers of the file sharing web project and is not affected by each other. Figure 3 uses "local host mode", developers can create a web project in http: // localhost / projectname. When the project developer opens the project from the source code management, they save the work replica to the same relative to the URL address of the personal web server, namely http: // localhost / projectname.

Tip: Even if you do not save your copy to your local host location (such as http: // productserver / webapp1), you can still completely isolate if your teammates do not save their work copies to the same web server. Save your work to the remote web server to perform pre-deployment test and debug (lookup timing and concurrency issues) in the project's production environment.

Advantage

To create, access, and manage web references more easily in isolation mode compared to the creation of items in semi-quarantine or non-separated development environments. Two or more developers can simultaneously debug an ASP.NET application on their respective servers. Compared with other collaborative development modes, the hardware, software, and server management costs of isolation mode are very reasonable. Support advanced source code management functions, such as shared (multiple) checkouts, as well as Merge, BRANCH, PIN, and Label. Can be used with any MSSCCI-compatible source management provider. Disadvantages In some cases, it is not possible to test (for example, the use of analog / agent and there is a hop limit, or the speed of the production server is much faster than the development of the computer). Each developer must be responsible for configuring IIS settings, and don't do this when a copy store is stored on a central Web server. All developers must have access to the same LAN or VPN. Semi-separation In this mode, create a file sharing web project by a team member, then use the source code management service integrated with Visual Studio .NET to add the item to source management. Other developers open the project from the source code management and edit the working copy of the main web project in isolation. However, they use the shared resource of the remote web server to run and debug. Unlike isolation development modes, developers save their work copies to the public web server. Multiple developers can still check out and edit the same files at the same time, but only one developer can run and debug applications on the web server. The following figure shows the relationship between the developer and its work copy between the shared web server when the file sharing web project is shared by the source code management. Figure 4 uses semi-quarantine modes that create web items (for example, http: // Teamserver / WebApp1_deva) on remote servers, and then add it to source management. When the project developers open the project from the source code management, they use different project names to save their work copies in different locations on the same remote web server (for example, http: // Teamserver / WebApp1_DEVB). Unlike simple isolation development modes, developers cannot use the same name as other developers to reference the copy. Advantage

Hardware cost is low, and each project only needs a set of enterprise software licenses. Teams can have a network administrator, specializing in sharing development resources management. No need to access http: // localhost. No need to install IIS on each developer's computer. Support advanced source code management functions, such as shared (multiple) checkouts, as well as Merge, BRANCH, PIN, and Label. Can be used with any MSSCCI-compatible source management provider. Disadvantage

When remarks when remarks, the debug process will lock the shared web server to prevent other users from using the items on the same server. Web references cannot be shared automatically. For more information, see Appendix A: Setting up the dynamic URL web reference. All developers must have access to the same LAN or VPN. Non-quarantine development In this mode, developers are not working on the WEB project, but all team members have edited them directly, and change their changes to the host copy of the FrontPage Web project. Developers cannot work in parallel, and they cannot be easily separated from other developers. The figure below illustrates how two developers interact in an insequent web project (configured in IIS to use an external version control) environment. Figure 5 is different from the file sharing project, in the IDE, you cannot add the FrontPage Web project to the source code management, and to change its version control status in IIS. For more information, see Setting up external source code management. BUILT IN (Built-in) and Use External (Use External) These two IIS version control options can enforce exclusive checkout, allowing only one developer to write operations on a certain moment. The difference between these two version control options is that the BUILT IN will not send the latest version to source management when checking, and the update version is sent to source code management. For the FrontPage Web project, it is recommended to use the USE External option. Advantages team members do not have to be connected via LAN or VPN. Disadvantage

Multiple checkouts are not supported. Cannot provide the same file security level as other modes. For example, if someone deletes a project file from the web server when using the Built IN version control, you cannot recover the file from the development of team members. You cannot use the FrontPage Access Method to add a web application to the source code management within Visual Studio. For more information, see Setting up external source code management. Advanced source code management functions are not supported, such as shared (multiple) checkouts; or Merge, BRANCH, PIN and LABEL and other orders. Can only be used with the Visual SourceSafe source management provider. The project must be saved in the NTFS partition. In the FrontPage Web project, any user can disable or enable source code management if you have administrator privileges, regardless of administrator privileges. Choose a collaborative development mode: Web Project Create this section to help you quickly select and implement a strategy for the development of ASP.NET Web projects in a team form. Please answer the questions in the table below to find collaborative development models for your team. After selecting a mode, you can use the suggested steps to create your web project and add it to source management. Figure 6: Determining way to create a web project: Creating a web project for source code management For most Web projects created in Visual Studio .NET, it is recommended that you isolate development modes. For more information on the advantages and disadvantages of this mode, see Isolation Development. Select web access method

On the Tools menu, click Options. In the Options dialog box, click the Projects folder, and then click Web Settings. Under Preferred Access Method, click File Share (file sharing). By creating a blank solution, you can improve the long-term manageability and searchaibility of the project can be improved in it. You can also maintain the close symmetry between local project files with their master copies on the source code management server. Creating a Solution Directory On the File menu, point to New, then click Blank Solution. In the New Project dialog, type the name and location of the solution.

Tip: Select a name that can be explicitly identified as a solution (for example

Salesweb_solution or

Salesweb_soln).

Create a web project

On the FILE (File) menu, point to Add Project, then click New Project. In the Add New Project dialog, select Visual Basic Projects (Visual Basic Project) or Visual C # Projects from the left pane. Select a web project template in the right pane. In the Location box, type http: // localhost / projectname (where ProjectName is the name of the new project), then click OK. Now you can add the web project to source management so your teammates are used in development. What happens about the following procedure, when you add a web project solution to the source code management? . If possible, add the item to the source code management database that allows shared checkout or multiple checkout. For more information, see Sharing checkout. Add a Web project (and its solution) to source code management

In the Solution Explorer (Solution Explorer), right-click the Solution Node and click Add Solution To Source Control (add the solution to source management). If you display a message box, click Continue. Provide database locations and user login information according to the requirements of the source code management provider. Create root solution directories on the source code management server by specifying a server location of a solution file. In the root solution directory, type the name of the project folder, which will contain the master copy of the web project file.

Note: To add a second project and follow-up project to source management in this solution, check into the solution after the change is completed.

To make full use of isolation development mode, the project developers must separately specify the same relative address (http: // localhost / projectname) of the project work copy (http: // localhost / projectname) when the web project is first managed from source code management. For detailed steps, see Open an existing Web project for the first time. Semi-separation: Creating a source code management Web project Although the semi-separated development mode is better than non-separation development mode, it helps to work as isolation mode. For an overview of the detailed description of this mode and its advantages and disadvantages, see Semi-separation. Select Web Access Method On the Tools menu, click Options. In the Options dialog box, click the Projects folder, and then click Web Settings. Under Preferred Access Method, click File Share (file sharing). By creating a blank solution, you can improve the long-term manageability and searchaibility of the project can be improved in it. You can also maintain the close symmetry between local project files with their master copies on the source code management server. Create a solution directory

On the FILE (File) menu, point to New, then click Blank Solution. In the New Project dialog, type the name and location of the solution.

Tip: Specify a name that can be explicitly identified as a solution (for example

Salesweb_solution or

Salesweb_soln).

Create a web project

On the FILE (File) menu, point to Add Project, then click New Project. In the Add New Project dialog box, select Visual Basic Projects or Visual C # Projects (Visual C # items). Select a web project template in the right pane. In the Location box, type http: // servername / ProjectName (where ServerName is the name of the web server, projectname is the name of the new project), then click OK. Now you can add the web project to source management so your teammates are used in development. Add a Web project to source code management

In the Solution Explorer (Solution Explorer), right-click the Solution Node and click Add Solution To Source Control (add the solution to source management). If you display a message box, click Continue. Provide database locations and user login information according to the requirements of the source code management provider. Create root solution directories on the source code management server by specifying a server location of a solution file. In the root solution directory, type the name of the project folder, which will contain the master copy of the web project file. At this point, the project is ready and can be developed. Now, each project developer must open the project from the source code management in accordance with the first step of opening an existing Web project. Non-quarantined development: Creating a source code management Web project for unicovable development modes and its advantages and disadvantages, see Nonicolation development. Use the following steps to create a source code management web project for non-separation development. Select Web Access Method On the Tools menu, click Options. In the Options dialog box, click the Projects folder, and then click Web Settings. Under Preferred Access Method, click FrontPage. By creating a blank solution, you can improve the long-term manageability and searchaibility of the project can be improved in it. You can also maintain the close symmetry between local project files with their master copies on the source code management server. Create a solution directory

On the FILE (File) menu, point to New, then click Blank Solution. In the New Project dialog, type the name and location of the solution.

Tip: Specify a name that can be explicitly identified as a solution (for example

Salesweb_solution or

Salesweb_soln).

Create a web project

On the FILE (File) menu, point to Add Project, then click New Project. In the Add New Project dialog box, select Visual Basic Projects or Visual C # Projects (Visual C # items). Select a web project template in the right pane. In the Location box, type http: // servername / ProjectName (where ServerName is the name of the web server, projectname is the name of the new project), then click OK. Now you can add the web project to source management so your teammates are used in development.

Note: If you already have FrontPage Server Extensions 2002, some of the following steps may be slightly different. Open external source management for FrontPage Web projects

Right-click My Computer, click Manage, and then click Services and Applications (Services, and Applications). Open Internet Information Services, then expand the default web site (default Web site). Right-click the web where the FrontPage Web project is located, then click Properties. In the Properties dialog box, click the Server Extensions tab, set the versioning control box to Use External, and then click OK. For all warning messages that may be displayed, click OK. At this point, the project is ready and can be developed. Now, each project developer must open the project from the source code management in accordance with the first step of opening an existing Web project. First Open Existing Web Projects This section can help you determine how to open a web project from source code and determine the best location for saving a copy (for file sharing web projects). Answer the questions in the table below and consult other project developers to determine the best way to open existing, source code management web projects for the first time. Figure 7: Way to determine the way to open the source code management

Note: For developers who are opening a file sharing web project (to make a sure to the first question), you need to ask the project owner to save the copy of the work. For isolation development, save it in http: // localhost /

Projectname. For semi-separation, use a non-local host URL to save a copy.

Isolation Development: Open Web Project for the first time

On the FILE (File) menu, click Source Control, and then click Open from Source Control (Open from Source Code). Find the web project you want to open in the appropriate source management database, then click OK. When the system prompts you to provide a copy of the local work, type http: // localhost / projectname, where ProjectName is the same as the name of the source code management.

Note: Please do not use the next time you open the project next time.

Open from Source Control (open from source management) command, should be used as in any other item

Open Project command.

Half separation: Open the web project for the first time

On the FILE (File) menu, point to Source Control, and then click Open from Source Control (Open from Source Management). Find the web project you want to open in the appropriate source management database, then click OK. When you are prompted to provide a local save location or a copy location, type http: // servername / projectname_myname, where ServerName is the name of the shared web server, the same name is the name of the source code of the source code, _MYNAME is your name Or the initial abbreviation. Note: Please do not use the next time you open the project next time.

Open from Source Control (open from source management) command, should be used as in any other item

Open Project command.

Non-quarantined development: Open the web project for the first time

On the FILE (File) menu, click Open, and then click Project from Web (Web Project). If the system displays the Web Access Failed dialog (usually displayed this dialog), click the Try to Open The Project With FrontPage Server Extensions button.

Note: Please do not use the next time you open the project next time.

Project from Web (Web Project) command, should be used as in any other item

Open Project command.

Backstage Source Code Management Integrates the following sections describe the case where you add a web project to source management or initiate from source code to open an item. What happens when adding a web project solution to source management? When you add a file sharing web project to the source code management, the following conditions appear:

Receive the message: "You are attempting to add some File Share Web access projects to source control.If you continue, you will no longer be able to open these projects using FrontPage Web access." (You are trying to certain file-sharing Web Access project Add to source management. If you continue, you will not be able to use FrontPage Web to open these items.) This is a regular notification message. For more information, see the web access method. Master copy, solution file Your source code management provider prompts you to specify the source code management server location for the master copy of the solution file. The provider then copies the corresponding solution item to that location. Solution files containing user-specific settings will never be added to source management. Master copy, the project file system will prompt you to specify another server location for the project file. Be sure to locate the project file in the subfolder of the solution. All can share project files will be copied from its location on the web server to the source management server. If the solution contains multiple items, the system will prompt you to specify a different server location for each project. The Solution Binding Source The Administration Provider will create bindings or relationships between the work folder in the work folder in a prompt manner. In this process, most source code management providers create one or more data files on the root of the work folder to store source management information. The project binding source code management provider will repeat the previous process. Since its working copy resides in the root directory different from the solution work, the source code management provider will create a separate project binding. The figure below illustrates how to bind the project's working copy to the master copy under the source code management. Since the file is located in a different root directory, you need to create two bindings for a simple solution Web project. Figure 8 What happens when opening a web project solution from source code management? The following cases occur when the Web project is opened from the source code management in Visual Studio .NET, the following is created: Binds for the solution file. Your provider requires you to identify your personal work folder for the solution file. This action creates a relationship or binding between the work folder in the source management database and its master copy. This process typically includes creating a data file in the root directory of the work folder. The default location of these files is the personal Visual Studio project directory. The solution file is copied to the work folder. Your Source Management Provider will create a copy of all solution files in the selected work folder. Set the location of the web file. In the Set Project Location dialog, the provider will prompt you to identify your personal work folder for each web project in the solution. This will create another binding between the work folder and it in the main control folder on the source management server. The project file is copied to the work folder. Finally, the source code management provider will create a copy of all WEB project files in the selected work folder. General prompt, pay attention to and guide

Create a blank solution and add your item to it. Doing so, you can organize project files on disk (Work Copy) in an organization of the project file in the source code management database (master copy). Mandatory implementation of parallel organizations can improve the long-term manageability of project documents and make it easier to perform certain advanced source code management operations such as branches and mergers. When adding a web reference in the ASP.NET project to the Web Service project on the same web server, use the absolute path, such as http: // servername / webservice1. Do not change the web access method of the project after adding the project to the source code management. When you open a web project for the first time, use the Open from Source Control on the Source Control (Source Management) submenu from the File menu. In the future, you can open the item from the local disk as any non-managed Web project: For file sharing projects and FrontPage Web projects, click File, point to Open, and then click Project. To sign a file sharing web project, developers must have access to LAN or VPNs residing for project master copies. If you want to use a laptop to use it at night, be sure to check out the file you want to edit before disconnecting the network. Don't use offline check out with Visual SourceSafe. When developing the FrontPage Web project, use the Use External (using External) Version Control options to be better than using the Built IN option. Use External You can prompt Visual Studio to save each check-in version into the source code management database, while Built IN is not prompted. For more information, see Non-isolated development. Allow a shared sign as much as possible. This operation should be performed if you may perform source code management operations on a solution to a Web project. For example, if you want to check out an ASP.NET web application project, check out its solution. The independent version of the source code management provider is used to perform an operation that cannot be completed in the IDE (for example, branch and merge branch). Use dynamic URL references. For more information, see Appendix A: Setting up the dynamic URL web reference. If your source code management provider is Visual SourceSafe, then you will always save your web page using an ANSI code. Do not store the work replica of the solution file on the IIS Web server. If you use FrontPage to access the web application created on the server's FAT or FAT32 partition, source code management will not work properly. Since the FAT partition is unable to provide a sufficient security environment, all operations will be performed by the same guest account IUSR_MACHINENAME. This way, when you try to perform an inspection or check out, you will cause your file to be incorrectly displayed to give another user in an exclusive way. This problem can be solved by disabling anonymous access to the project in the IIS Management tool, but this solution is not supported. Therefore, it is highly recommended that you convert the FAT partition to the NTFS file system. common problem

What method can I deploy my web application to the web? Get the latest version from the source code management, check into your changes as needed, and then copy the master copy of all item files to the appropriate production server location using the Copy Project command. For more information, see

Appendix C: Deploying a web project.

When the location of each project changes, how can my team avoid deleting the same web reference?

You can configure a web project to accept dynamic URL web references. For more information, see

Appendix A: Sets the dynamic URL web reference.

Why do you have so many dialog box when you create a web project? Why do you have to set the project position twice?

You may have noticed that Visual Studio will create a new solution when you create a new project without a solution. Solutions containing Web projects are not different from solutions that contain non-Web projects. That is, they originally contain two files (

Solutionname.sln and

Solutionname.suo) and by default, the two files are saved to the location where the Visual Studio project on the disk is saved. On the other hand, the Web project file must be saved to the virtual directory.

As long as you add two or more (eg, solution files and project files), your source code management provider creates a link file in the root of these items. If these items share an root directory, the provider will create a link file in the lowest level of public root directory. If these items do not share a public root directory, for example, some items have been left on disk, while others reside in virtual memory, providing programs to create a link file in two locations. Therefore, when you add a web project solution to the source code management, the provider will prompt you to identify the work folder, once used for the logo solution, and use it for identification items.

What method can automatically notify Team members about Web Service changes to ensure timely refreshing all client references?

Visual Studio .NET does not provide such tools. Editing Team members of Web Service must inform other team members related to changes.

I have four developers in the team, two of which work positions outside the enterprise network. Which collaborative development model should we use when developing a web application project?

Use non-isolated development modes.

Frequently Asked Questions for Visual InterDev Developers

Is my team working in local mode? In VID, each developer works offline, saving the changes to the local working copy, and then update the primary server version. Can you do this in Visual Studio .NET?

can. Unlike the clear identity in the IDE, the local mode is the method of using the default when developing a Web project in Visual Studio .NET. To use local mode, please use

Isolation or

Semi-separation development mode.

Is my team working in the host studio ?NET?

can. You can set your web access mode to FrontPage and use non-separated development modes. However, in the compiled ASP.NET environment, non-isolation mode is often not recommended for team development. For more information, see

Non-isolated development.

In Visual Studio .NET, how do I publish my work on or to synchronize changes to the primary server? Unlike VID, there is no Visual Studio .NET

Release Working Copy Command. To update the production server (primary server) in Visual Studio .NET, you must deploy one of several ways. The first step in deploying the ASP.NET project is to update the master copy of the source code management. The second step is to copy the project file to the production server. For more information, see

Deploy web project.

How can I delete my project from source code management as in VID?

in

File (File) menu, click

Source Control, then click

Change Source Control (Changing Source Code Management). in

In the Change Source Control dialog box, select the item you want to delete from the source code management, and then click

Disconnect.

Work Replica This term is the same in Visual Studio .NET is the same as the meaning in the VID?

Not exactly the same. In VID, a copy of the work refers to the version of the Web with write permissions. In local mode, your local version is a copy. In the master mode, your master copy is a copy.

For file sharing web projects in Visual Studio .NET, the copy is always for your personal version. For the FrontPage Web project (see Non-isolated development), all team members save the changes to the same master copy.

How to synchronize my changes to the server when I work on my working copy (local version)?

As mentioned earlier, only the copy of the WEB project is only available. In the file sharing project, the master copy resides in the source code management database and cannot be accessed using the browser. To synchronize the changes made to the work copy with the master copy of the source code management, obtain the latest version from the source code management, generate a project in Visual Studio, and then check into the project.

Appendix A: Setting up Dynamic URL Web Reference If you create a solution that includes both an XML Web Service, an ASP.NET Web project, and a web reference is valid for you from your ASP.NET project. Other users are invalid. Team members cannot always share web references because Visual Studio stores these references to static and hardcoded strings in the web.config file. If all team members set their own copy of the project location to http: / localhost / projectname, this problem does not happen, because doing so can effectively specify the relative path of the physical location http: // computername / ProjectName. For non-local host projects, you can solve this problem by converting a static web reference URL in the project's web.config file to dynamic properties. You should use dynamic properties to configure applications so that the partial or all property values ​​of the attribute are stored in an external configuration file instead of being stored in the compiled code of the application.

Tip: Because you or any other user can change the property value at runtime, you can use dynamic properties to quickly and easily test different web services.

You can also use dynamic properties to make your Windows application easier for testing, deployment, and management. For more information, see Introduction to Dynamic Properties. The following steps describe how to effectively share web references when the Web Service on the same server in which the calling project is located is referenced. These steps assume that you have created a file sharing web project called WebApplication1 on the server named Server1, and you have added a Web reference to WebApplication1 that references WS1. Tip: By opening service1.asmx, switching to code view, then deleting an comment from the corresponding code line of the Hello World, you can quickly create the web service. In order to distinguish these two services at runtime, "Hello World" and "Hello World: WS2" are changed in their respective documents.

Under source code management, make Web references URL dynamic configuration and sharing

In the Solution Explorer, expand the Web References folder and select the appropriate service. In the Properties window, change the value of the URL BEHAVIOR Change to Dynamic (Dynamic). Suppose your web service returns a type of content, Visual Studio automatically adds the following code to the web.config file: 'Visual Basic

// c #

In this example, the keyword properties identifies the name of the web reference, and the value attribute identifies the target. In the Solution Explorer (Solution Explorer), right-click WebApplication1, point to Add, and then click Add New Item. In Add New Item - WebApplication1 (Add New Item - WebApplication1) dialog box, select Text File. In the Name box, type User.config, and then click Open. In the user.config file, paste the following code:

Value = "http://localhost/ws1/service1.asmx" /> Open Web.config, change to , then delete Start and End all the code between the tag. Now, you already have a personal configuration file that will override public settings in the web.config file.

Note: If your project is managed by the source code, right-click User.config and click

Exclude from Source Control (excluded from source code management). The User.config file contains your personal configuration settings.

When another user opens WebApplication1 from source code and attempts to generate an application, WS1 will be displayed as inaccessible. This problem is that the source code management public web.config file is referenced by your personal WS1 work replica storage location. To automate WS1 automatically an object accessible to other users, indicate these users to create their own personal profiles (and make sure that these configuration files are not added to source management). Each developer who opens your WebApplication1 project must perform the following steps. Enjoy web references in the team

In the Solution Explorer (Solution Explorer), right-click WebApplication1, point to Add, and then click Add New Item. In Add New Item - WebApplication1 (Add New Item - WebApplication1) dialog box, select Text File. In the Name box, type User.config, and then click Open. Paste the following code in the user1.config file.

Value = "http://localhost/ws1/service1.asmx" />

Open the web.config file and change to

In WebApplication1, open WebForm1.aspx, then drag and drop the Label control from the toolbox to the designer. Double-click the designer to switch to the code view, then paste the following code to the page_load event handler: server1.service1 a = new localhost.service1 (); label1.text = a.HelloWorld (); generates WebApplication1. If you have performed all the steps in the previous process, you can see Hello World: WS1. Open C: /inetpub/wwroot/webapplication1/user.config at the Code Editor. Change value = "http:/localhost/ws1/service1.asmx" to value = "http:/localhost/ws2/service1.asmx" and save your changes. When you run WebApplication1 next time, you can see "Hello World: WS2" instead of "Hello World: WS1". Appendix B: Changing the Web Access Method Changing the project's web access method will fundamentally change your team and your team partners interact with the master copy under source code. It is recommended to upgrade the FrontPage project to file sharing. The file sharing project is converted to the FrontPage Web Access method only when absolutely necessary. Before performing the following steps, make sure that all items you want to change have been signed in source code management. Choose one of the following links to learn how to change the web access method of the web project:

Upgrading from Visual InterDev Project To File Sharing From FrontPage to File Sharing Set File Sharing Project To FrontPage Upgrade from Visual InterDev Project to File Sharing You can upgrade source management Visual Interdev (VID) Web to ASP.NET for use File Sharing Web Access Method Access from Source Code Management.

Note: This process can effectively bifurk your VID project into two projects under source code management. You can still view history and perform source code management operations on earlier versions of the project, but can only be done by opening the VID project in source management.

Upgrade from Visual InterDev project to file sharing

Open Visual Studio .NET, click Tools, and then click Options. In the Options dialog box, click the Projects folder, and then click Web Settings. Under Preferred Access Method, click File Share and close the dialog. On the File (File) menu of Visual Studio .Net, point to New, then click Project. In the New Project dialog, select a language in the left pane (Visual Basic or C #), click the ASP.NET Web Application in the right pane, Type location (for example http: // localhost / mynewweb), then click OK. Minimize Visual Studio .NET IDE, launch Visual SourceSafe Explorer, and open the SourceSafe database that contains VID project files. Open your web project folder, select all source files in the Contents pane, point to SourceSafe, and then click Get Latest Version (get the latest version). In the Get dialog, all texts in the To (to) box are replaced with the ASP.NET web application path (such as C: / INETPUB / WWWWROOT / MyNewwe), select Make Writable, then single Hit OK (OK). In Visual Studio .NET, select your item and click Add Existing Item on the File menu. In the Add Existing Item dialog, open the WEB project's work folder, select all the files that have just been managed from the source code, and then click Open. Right-click the Solution Node in Solution Explorer, then click Add Solution To Source Control (add the solution to source management). Upgrading from FrontPage to File Sharing The FrontPage Web project created in Visual Studio .Net To recommends file sharing web access method, you can:

Improve the daily manageability and integrity of the team's ASP.NET web application resource. Use a source code management provider than Visual SourceSafe. In the past, only Visual SourceSafe This source management provider managed to manage web projects. Many third-party source code management applications support file sharing web access methods. In the following steps, the source code management integration of the FrontPage Web project will be disabled using the Internet Information Services (IIS) management console, and then use the Visual Studio .NET to change the web access method and re-bind the project to the source code management. Disable source code management of FrontPage Web Project Right-click My Computer, click Manage, click Services and Applications, Open Internet Information Services, then expand the default web Site (default Web site). Right-click the web where the FrontPage Web project is located, then click Properties. In the Properties dialog box, click the Server Extensions tab, set the version of the version of the Version Control to None, and then click OK. For all messages that may be displayed, click OK. Now, open Visual Studio .NET, change the web access method to file sharing, then restroom the project to your personal work folder under the source code management. Change the web access method and rebound project

On the IDE File menu, point to Open, click Project from Web (Web Project), enter the URL of your web project, and then click OK. In the Solution Explorer (Solution Explorer), right-click the item and click Properties. Under the CommON Properties of the Project Properties dialog box, select Web Settings, and then change the value of Web Access Mode to File Share (file sharing). In Visual Studio, turn off the web project and its solution first, then reopen. In the Solution Explorer (Solution Explorer), select the item, point to Source Control on the File menu, and then click Change Source Control. In the Change Source Control dialog box, select your project, click Bind, and then click OK. Click OK for all warning messages displayed. Note: You must restore the solutions and items to their previous save locations to keep the source code management history.

In the Solution Explorer (Solution Explorer), right-click the item, click Check Out, for the latter display, click OK. When displaying "Your Folder Contains A Writable Copy Of Project Path" message message message, select Leave this file, and then click OK. In the Solution Explorer (Solution Explorer), right-click the item and click Check IN. Conversion of file sharing projects to FrontPage Classifying a replacement before converting a file sharing web project to a FrontPage web access method. Convert to FrontPage, you can:

Visit the design time of the design of the .NET Passport authentication. Items that are connected or allowed to access the firewall, including one or more team members that cannot be accessed through the LAN or VPN. Transfer from file sharing to FrontPage web access method

Select the ASP.NET Web project in the Solution Explorer (Solution Explorer). On the FILE (File) menu, point to Source Control, and then click Change Source Control. In the Change Source Control dialog box, select your web project, then click UNBIND. Repeat this step for each item in the Change Source Control list, accept all messages displayed, and then click OK. In the Solution Explorer (Solution Explorer), right-click the web project you want to convert, and then click Properties. Under the CommON Properties in the Project Properties dialog box, select Web Settings, and then change the value of Web Access Mode to FrontPage. Select the solution and on the File menu, click Close Solution. Now you can enable source code management for FrontPage Web. Some of the following procedures may differ from the steps in FrontPage Server Extensions 2002. Open external source management for FrontPage Web projects

Right-click My Computer, click Manage, and then click Services and Applications (Services, and Applications). Open Internet Information Services and expand the DEFAULT Web Site node. Right-click the web where the FrontPage Web project is located, then click Properties. In the Properties dialog box, click the Server Extensions tab, set the versioning control box to Use External, and then click OK. For all warning messages that may be displayed, click OK. Appendix C: Deploying Web Project Visual Studio .NET provides a variety of powerful deployment tools, including web settings and deployment projects. The following procedure describes a simple way to extend changes in the master copy (in the source management database) to its production server location. For more information on other Visual Studio .NET deployment alternatives, see Methods Of Deployment. For web projects, you can use the Copy Project on the Project menu. Copying items (rather than deployment projects) is a simple way to move project content to the target web server. However, the replication operation cannot automatically configure the Internet Information Service (IIS) directory setting. Therefore, in most cases, we recommend that you deploy projects because it allows you to take advantage of many deployment project management functions such as registration and IIS configuration. By default, the Copy Project command creates a new web application on the target server and only copies the file you want to run to the application. FrontPage Server Extensions must be installed on the Target server to use the Copy Project command. Also, note that the web access method you use to deploy the project is completely unrespoquent with the web access method of the project in Visual Studio, nor does it change the latter. The following steps will be deployed through the HTTP. Deploy the ASP.NET Web project On the Project menu, click Copy Project. Select the destination project folder and server. Click the FrontPage button.

Note: In this environment, FrontPage is the default option and is also the option to use. If you use

File Share (File Shared) option, use the following syntax settings

Path: // servername / wwwroot $ / projectname.

转载请注明原文地址:https://www.9cbs.com/read-92276.html

New Post(0)