Installation of AnkhSVN Visual Studio 2019

42,093

Solution 1

I have made a fork of the AnkhSVN project and published a version on Visual Studio Marketplace as AnkhSVN2019.

This version targets only Visual Studio 2019.

The page on the Visual Studio Marketplace is here:
https://marketplace.visualstudio.com/items?itemName=PhilJollans.AnkhSVN2019

You can also find it by searching the Visual Studio Marketplace in Visual Studio.

The project is on GitHub here:
https://github.com/PhilJollans/AnkhSVN2019

As far as I can tell it is working correctly, but that is based on a small number of systems, and I only use a subset of the features.

Support for Visual Studio 2022

My fork of AnkhSVN does not support Visual Studio 2022, but there is a version in the GitHub repository from the original developers of AnkhSVN.

As of 4-December-2021, this version is not available in the Visual Studio Marketplace, but you can download the package from the releases page on GitHub.

As of 4-December-2021, the download link for the current version is
https://github.com/AmpScm/AnkhSVN/releases/download/v2.9.87/Ankh-VSIX-2022.zip,
but there may now be a newer version.

Solution 2

The latest AnkhSVN version is not compatible with Visual Studio 2019 (and the project, unfortunately, seems dead).

A possible solution is to edit manually the files stored in the vsix file (it's a zip file with a different extension).

The file to edit are:

  • extension.vsixmanifest
    Change the occurance of [15.0,16.0) to [15.0,17.0)
    Change the prerequisite in this way:
    <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />

  • catalog.json
    search Microsoft.VisualStudio.Component.CoreEditor and change the version to "[15.0,)"

  • manifest.json
    search Microsoft.VisualStudio.Component.CoreEditor and change the version to "[15.0,)" as the catalog.json

After these changes it's possible to install the extension in VS2019 but still open a warning shown by VS related an incompatibility of the load process (AnkhSVN use a synchronous load, VS2019 want an async load).

Solution 3

Looks like it doesn't support VS2019 by default. https://ankhsvn.open.collab.net/ But you can try to update extension for VS2019.

  1. Rename vsix to zip
  2. Unzip
  3. Open extension.vsixmanifest, manifest.json and catalog.json and for Microsoft.VisualStudio.Component.CoreEditor change version to [15.0,)
  4. Open extension.vsixmanifest and also replace all [15.0,16.0) by [15.0,17.0)
  5. Zip all files
  6. Rename to vsix

Solution 4

The original AnkhSVN project developed by CollabNet is now abandoned and does not support Visual Studio 2019 now (the project is inactive for more than 17 months). As an alternative, consider migrating to VisualSVN that is now completely free for use on non-domain computers (no registration required) and provides about the same functionality compared with AnkhSVN (some users consider VisualSVN to be better for their use cases).

Migrating from AnkhSVN to VisualSVN is a straightforward process. The most recent VisualSVN 7.1 and VisualSVN 6.5 releases add support for multiple working copies within a single solution, and this makes the migration practically instant and painless for almost all users. See the article KB58: Migrating from AnkhSVN to VisualSVN for instructions and the article KB7: Using Multiple Working Copies in VisualSVN if your solution projects span across multiple working copies.

Note that the workarounds suggested in the accepted answer may cause overall Visual Studio destabilization and do not make AnkhSVN compatible with Visual Studio 2019. See the comments under these answers:

BTW, according to this post, those hacky workarounds do not work anymore.

DISCLAIMER: I am a support engineer with VisualSVN Team.

Solution 5

I've just installed AnkhSVN 2.8.12824 via "Manage Extensions". It seems to work, though Visual Studio 2019 complains that it might not be compatible with a future Visual Studio update (Deprecated APIs).

See also https://ankhsvn.open.collab.net/ds/viewMessage.do?dsForumId=582&dsMessageId=647485

Possibly also https://docs.microsoft.com/en-us/visualstudio/extensibility/synchronously-autoloaded-extensions?view=vs-2019

Share:
42,093
Rock Junior
Author by

Rock Junior

Updated on July 18, 2022

Comments

  • Rock Junior
    Rock Junior almost 2 years

    I can not Install AnkhSVN -Subversion Support for Visual Studio 2019,

    I have tried to Install It, It says Version is Invalid for VS2019

    I use VS2019 Professional

  • Rock Junior
    Rock Junior about 5 years
    My Manifest has 15.0.25904.0 and <Prerequisites> <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0.25904.1,)" DisplayName="Visual Studio core editor" /> <Prerequisite Id="Microsoft.VisualStudio.Component.ManagedDesktop.Prerequi‌​sites" Version="[15.0.25904.0,)" DisplayName=".NET desktop development tools" /> </Prerequisites>
  • Rock Junior
    Rock Junior about 5 years
    this is Manifest.json has 15.0.25904.0 and another one is <Prerequisites> <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0.25904.1,)" DisplayName="Visual Studio core editor" /> <Prerequisite Id="Microsoft.VisualStudio.Component.ManagedDesktop.Prerequi‌​sites" Version="[15.0.25904.0,)" DisplayName=".NET desktop development tools" /> </Prerequisites>
  • vik_78
    vik_78 about 5 years
    @RockJunior if it doesn't have the second number - it's OK. So [15.0.25904.0,) - should work
  • Rock Junior
    Rock Junior about 5 years
    not working yet but on dd_VSIInstaller.log this is log file i found tese numbers Microsoft.VisualStudio.Community Version : [15.0,17.0) Microsoft.VisualStudio.Pro Version : [15.0,17.0) Microsoft.VisualStudio.Enterprise Version : [15.0,17.0) Microsoft.VisualStudio.IntegratedShell Version : [15.0,17.0)
  • vik_78
    vik_78 about 5 years
    I missed that "Microsoft.VisualStudio.Component.CoreEditor" also present in catalog.json. Have you change this also? Microsoft.VisualStudio.Community etc. are targets for install should. [15.0,17.0) - it's OK for targets
  • Rock Junior
    Rock Junior about 5 years
    Now I found two numbers on "Microsoft.VisualStudio.Component.CoreEditor" in Manifest.json and Itried to Change from 16.0,17.0 to 15,0,17.0 but still did not work. and In Catalog.json there is no These numbers there is only "{"id":"Microsoft.VisualStudio.Platform.CallHierarchy,versio‌​n"
  • vik_78
    vik_78 about 5 years
    @RockJunior No. "Microsoft.VisualStudio.Component.CoreEditor" should be changed to "[15.0.)". gigios answer is correct also and has good details about files
  • Rock Junior
    Rock Junior about 5 years
    Yes I did but still does not work, Do you have this VS2019 Installed? i tried a lot
  • Admin
    Admin about 5 years
    I have downloaded directly the last available version from the Visual Studio Marketplace: marketplace.visualstudio.com/… In this package the versions are 15.0 and 16.0 I have changed the files inside this archive and I'm able to install in VS2019 (with the warning about the incompatibility as I wrote in the previous post).
  • vik_78
    vik_78 about 5 years
    @AnkhSVN Yes. I downloaded last AnkhSVN and made all changes mentioned above and extension is appeared in VS. But I don't know how to use it, so it is untested.
  • Rock Junior
    Rock Junior about 5 years
    Yes, and from all what i saw al numbers that i have are (16.0,17.0) and i tried to Change all but result was the same
  • Admin
    Admin about 5 years
    This is very strange. If you want try to download my version: s000.tinyupload.com/index.php?file_id=99386398029505094080 This is the original version with only the change in the version of manifest and json file.
  • Rock Junior
    Rock Junior about 5 years
    Now it is no more strange, it is working through your Installer. Thanks very much
  • Yogi
    Yogi almost 5 years
    This version was working fine under VS2019 version 16.0, but then failed on upgrade to 16.1.0 and then was automatically disabled in 16.1.1. However, you can re-enable it via Tools>Options>Environment>Extensions and then check the box "Allow synchronous autoload". This check box might only be available in 16.1.1 and above. For more info see: devblogs.microsoft.com/visualstudio/…
  • Berend
    Berend almost 5 years
    How exactly did you install Ankh through Manage Extensions? When I search for Ankh, nothing is found.
  • bpeikes
    bpeikes almost 5 years
    Had the same issue after VS2019 16.1.0. Checked the link on the marketplace, and it is now dead. Not sure if this is going to be updated anymore.
  • Gary
    Gary almost 5 years
    Seems to still be active on GitHub: github.com/simonp22/AnkhSVN Last commit mentions start of work on background loading.
  • jumbo
    jumbo almost 5 years
    I get We're sorry, the page you requested cannot be found!
  • Johan Danforth
    Johan Danforth almost 5 years
    I managed to edit the vsix and install it, but it doesn't work at all in vs2019 version 16.1.1, get loads of crashes.
  • vik_78
    vik_78 almost 5 years
    @JohanDanforth looks like they are still working of support VS2019
  • Johan Danforth
    Johan Danforth almost 5 years
    The owner removed the program from the marketplace until he works out the async loading in the code, according to a comment from him in the github project
  • Johan Danforth
    Johan Danforth almost 5 years
    The owner removed the program from the marketplace until he works out the async loading in the code, according to a comment from him in the github project
  • Yogi
    Yogi almost 5 years
    I've not had any issues with AnkhSVN with VS synchronous autoload enabled. However, it seems MS is pushing extension devs to upgrade to async. As Johan Danforth notes, the dev says, "I’ve taken it off the marketplace whilst I figure out how to get the A-synchronous loading to work. Fairly new to this project as it was abandoned by the old developers" Link: github.com/simonp22/AnkhSVN/issues/9
  • Louis
    Louis almost 5 years
    With vs2019 16.1.5, "Show Changes" works fine so far, but when I bring up "View History" dialog, clicking on any entry in the list would crash vs2019. :(
  • Conrad
    Conrad almost 5 years
    Where did you get v2.8.12824?
  • Conrad
    Conrad almost 5 years
    When I try to run the modified .vsix file, I always gets the error, This VSIX package is invalid because it does not contain the file extension.wsixmanifest at the root. The VSIX file may be corrupted. I have confirmed that file exists. I have tried zipping with 7-zip and Win Desktop Send to -> Compressed (zipped) folder. Any idea why this is now being flagged as an invalid archive?
  • Conrad
    Conrad almost 5 years
    When I try to run the modified .vsix file, I always gets the error, This VSIX package is invalid because it does not contain the file extension.wsixmanifest at the root. The VSIX file may be corrupted. I have confirmed that file exists. I have tried zipping with 7-zip and Win Desktop Send to -> Compressed (zipped) folder. Any idea why this is now being flagged as an invalid archive?
  • Conrad
    Conrad almost 5 years
    @vik_78 yes, editor (using VS 2017) was closed before zipping.
  • Kvasi
    Kvasi over 4 years
    I tried this and it works fine to install. Later when I add a file to a project I get System.NullReferenceException. So it does not seem to work even if you get it to install.
  • Rock Junior
    Rock Junior over 4 years
    Our company prefer AnkhSVN, thats why
  • Harag
    Harag over 4 years
    Much prefer if AnkhSVN updates to use VS2019 than to pay for this. For now I'll use use TSVN.
  • bahrep
    bahrep over 4 years
    @Harag VisualSVN is completely free on non-domain computers. Did you know that?
  • Nasenbaer
    Nasenbaer over 4 years
    Additional changes needed in extension.vsixmanifest ` <InstallationTarget Version="[15.0,)" Id="Microsoft.VisualStudio.Pro" /> <InstallationTarget Version="[15.0,)" Id="Microsoft.VisualStudio.Enterprise" /> <InstallationTarget Version="[15.0,)" Id="Microsoft.VisualStudio.IntegratedShell" />`
  • Rock Junior
    Rock Junior over 4 years
    But with answer from @gigios above, it is possible and i use it now for VS2019
  • Daniel
    Daniel over 4 years
    Thanks, i have tested and it seems to work great, Commit, View History works fine
  • tslin
    tslin over 4 years
    Thanks a lot. Working great. This solution should marked as answer.
  • AFract
    AFract over 4 years
    Thanks a lot. Actually as I can guess on the amount of recent commits on the official github, it's much more than a simple adaptation of the existing AnkhSVN project. I would like to be able to vote up it a thousand times, it should be the accepter answer !
  • AFract
    AFract over 4 years
    See stackoverflow.com/a/59335391/461444 answer for a out of box working solution !
  • mipe34
    mipe34 over 4 years
    Doesn't work for me. So sad. Installed it, but nothing seems to happen.VS version 16.4.1
  • Phil Jollans
    Phil Jollans over 4 years
    Can you first open Extensions/Manage Extensions/Installed and check that AnkhSVN2019 is really installed and not disabled. If that is OK, can you open Tools/Source Control/Plug-in Selection. You should find AnkhSVN2019 in the list of source control plug ins. You will have to select AnkhSVN2019 as the Current source control plug-in.
  • jotbek
    jotbek over 4 years
    Great, Thanks a lot!
  • Behzad
    Behzad about 3 years
    I'm using VS Community 2019 Ver. 16.8.6 and it doesnt recognized the svn repo. VS prompts extension stopped responding
  • RotatingWheel
    RotatingWheel over 2 years
    Great help! thanks a lot.