Automated compilation and publishing of ASP. NET Core Web application via teamcity

Source: Internet
Author: User

Download

    1. TeamCity, current version: 2017.1
    2. Teamcity plug-in:. NET Core Support
    3. . NET Core SDK, current version: 1.0.1

Installation

Install teamcity. Places to be aware of:

    1. Installation path
    2. Port, this is 9080.
    3. Install the account for the server and agent Windows services (it is recommended to use the system account instead of the user account)

After the installation is complete, the Teamcity page is automatically opened and the configuration is initialized. Data Catalog, database and management users.

Install the Teamcity plugin:. NET Core Support.

There are two ways to install plug-ins, the details can be referred to "Installing Additional Plugins". Here is a brief description of how the file is copied.

    1. Find the plugin folder, here is: C:\ProgramData\JetBrains\TeamCity\plugins
    2. Copy the downloaded plug-in file (Dotnet-core-plugin.zip) in, and be careful not to change the file name.
    3. Restart the Teamcity service, refresh the Teamcity page, and teamcity will install the plugin automatically.
    4. After the plug-in installation is complete, you can check the Administration->plugins list page to see if the plugin is installed correctly.

Install the. NET Core SDK.

Configuration

The next step is to complete the process of automatically compiling and publishing the Web application by configuring Teamcity.

    1. Create Project. Administration->projects->create Project
    2. Configure VCs as per the actual situation.
    3. Create the project.
    4. Because the. NET core teamcity plug-in is installed, several key build processes are automatically checked out. This only requires the first two, which is restore and publish.
    5. Modify the publication. Only configuration and output directory are modified here
    6. Save. The most basic automated release process has been completed here. Can already be run.

Perfect

Next, I will be based on some of the actual situation, the configuration of the teamcity to complete a step.

    1. When the ASP. NET core Web application is hosted in IIS, running the above process may cause problems with the inability to copy files. There are two ways to solve this problem:
      1. Stop the IIS service before publishing and start the IIS service when publishing is complete. Add two command-line step.
        1. net start w3svc
        2. net stop w3svc
      2. Stop a site before publishing, launch a site after publishing
        1. "C:\Windows\System32\inetsrv\appcmd" Start Sites "name"
        2. "C:\Windows\System32\inetsrv\appcmd" Stop Sites "name"
    2.     

Automated compilation and publishing of ASP. NET Core Web application via teamcity

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.