Migrate pages from wiki extension to a team project wiki

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

Learn how to migrate pages created using the Wiki Marketplace extension to your team project wiki. With the release of the built-in wiki, any wiki pages created using the Wiki Marketplace extension can be saved to a Git repo in your team project.

Prerequisites

You must be a member of the Contributors group of your team project to migrate wiki pages to your team project wiki.

Migrate pages and other artifacts

  1. Clone vsts-wikiTools repository and compile the MigrateToVSTSWiki tool.
  2. Create, and then clone your Azure DevOps wiki.
  3. Move and commit all Markdown pages to your Azure DevOps wiki.
  4. Run the wiki migration tool, MigrateToVSTSWiki.exe
  5. When the wiki migration tool is complete, push the changes to the default main branch, wikiMain, of the Azure DevOps wiki repository.

Detailed steps

  1. Clone vsts-wikiTools repository and compile the MigrateToVSTSWiki tool.

  2. Compile the project under the path Tools/MigrateToVSTSWiki to generate the migration tool EXE.

  3. From a web browser, open your Azure DevOps team project and create your first wiki page.

  4. Get the URL to clone your wiki. See Clone your wiki and edit wiki pages offline.
    Name this clone location as LocationA for this procedure.

  5. Clone your wiki repo using your IDE or the git clone command.

  6. Clone the wiki extension repo. The wiki is mapped to a folder given to you during the wiki creation. You can confirm by going to the manage wiki option in the existing wiki, as shown in the following example. Your existing wiki pages are saved under the folder labeled Root.

    For example, you cloned the previously mentioned sampleWiki in the location C:\wiki\sampleWiki*. The wiki pages are saved in the path *C:\wiki\sampleWiki\ _extensionWiki

    Name this location as LocationB for this procedure.

  7. Create an empty folder in any path on your local machine, and name it LocationC for this procedure.

    In summary, the following locations are represented as follows:

    • Location A = Azure DevOps Wiki repo
    • Location B = Wiki extension repo
    • Location C = Empty folder to run migration tool in
  8. Open a command prompt as an administrator and run MigrateToVSTSWiki.exe. This tool copies the files from your existing wiki to the destination directory you provide. During copying, the tool converts the pages to be compliant with the Azure DevOps wiki.

    MigrateToVSTSWiki.exe /source:LocationB /destination:LocationC

    For example:

    • E:\wiki\sampleWiki\_extensionWiki is the folder in which the existing wiki files are present
    • E:\Temp\Wiki\New is the empty folder into which the migrated files are to be copied.
  9. Remove all the files from LocationA (if any) apart from the Git related files, such as .gitignore, and so on.

  10. Copy all the files from LocationC and paste them into LocationA.

  11. Run git add . to stage all the newly added files in LocationA for the commit.

  12. Run git commit -m <commit message> to commit the locally staged files.

  13. Run git push origin wikiMain -f to push the changes to the default branch of the Azure DevOps wiki.

After you migrate your wiki extension files to the Azure DevOps Wiki, you're ready to uninstall the Wiki extension.

Contributions

This project adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any questions or comments.