Migrate pages from Wiki extension to a team project wiki

Last Update: 7/19/2017

Team Services

NOTE

Feature availability: Use this topic to migrate pages made using the Wiki Marketplace extension to the Team Services Wiki. The Wiki* hub is in Preview and only available for Team Services at this time. To learn more, see Add and edit your team project Wiki.

With the release of the Team Services wiki, any wiki pages that you created using the Wiki Marketplace extension have been saved to a git repo in your team project.

You can migrate the markdown pages and other artifacts that were added to that repo to your team project wiki with these steps:

  1. Clone vsts-wikiTools repository and compile the MigrateToVSTSWiki tool
  2. Create and then clone your Team Services wiki
  3. Move and commit all markdown pages to your Team Services wiki
  4. Run the wiki migration tool, MigrateToVSTSWiki.exe
  5. Once you are done, push the changes to the default master branch, wikiMaster, of the Team Services wiki repository.

To perform these changes, you must be a member of the Contributors group of your team project.

Detailed steps

Here are the detailed steps for Wiki migration:

  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 Team Services 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.

    Let the clone location be identified as "LocationA" for the purposes of these procedures.

  5. Clone your Wiki repo using your IDE or git clone command.

    Manage wikis menu option

  6. Clone the Wiki extension repo. The Wiki will be mapped to a folder given to you during the wiki creation. You can check that by going to "manage wiki" option in the existing wiki as shown below.

    You'll find your existing wiki pages are saved under the folder labeles "Root".

    For example, say you have cloned the above mentioned "sampleWiki" in the location "C:\wiki\sampleWiki". The wiki pages are saved in the path "C:\wiki\sampleWiki\ _extensionWiki"

    Let this location be identified as "LocationB" for the purposes of these procedures.

  7. Create an empty folder in any path of your choosing in your local machine and let that be "LocationC" for the purposes of these procedures.   In summary:

    • Location A = Team Services Wiki repo
    • Location B = Wiki extension repo
    • Location C = Empty folder where we will run our migration tool
  8. Open a command prompt as an administrator and run MigrateToVSTSWiki.exe. This tool will copy the files from your existing wiki to the destination directory you provide. During copying, the tool converts the pages to be compliant with the Team Services 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. Next, remove all files from "LocationA" (if any) apart from the git related files such as .gitignore etc.

  10. Copy all 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 to commit the files that you have staged locally.

  13. Run git push origin wikiMaster -f . to push the changes to the default branch of the Team Services Wiki.

NOTE

Once you have migrated your Wiki extension files to the Team Services Wiki, you are ready to uninstall the Wiki extension. Linked work items are currently not supported in the new VSTS Wiki. We will be shipping the feature to link work items to Wiki pages soon.

Contributions

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.