54

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

Phil Jollans
  • 3,605
  • 2
  • 37
  • 50
Rock Junior
  • 655
  • 1
  • 5
  • 13
  • Have you tried VisualSVN for Visual Studio 2019? https://marketplace.visualstudio.com/items?itemName=VisualSVNLimited.VisualSVN-VS2019 – bahrep Jul 23 '19 at 13:00
  • Thanks in that time was not given direct yet – Rock Junior Aug 26 '19 at 11:43
  • I'm seeing problems with creating a new Subversion repository by uploading a source code solution and associated projects with Visual Studio 2017. This seems to work fine with Visual Studio 2015. Other functions such as commits, updates, browsing seem to work fine in Visual Studio 2017 however uploading a new project causes Visual Studio 2017 to hang. I see no error messages. – Richard Chambers Feb 22 '21 at 15:30
  • which version do u have of AnkhSVN subversion, is it 2019, i installed AnkhSVN2019 from @Phil Jolans in Enterprise vs2017 worked fine – Rock Junior Feb 23 '21 at 17:48
  • @Phil Jolans, Guten Morgen, Hast du schon VS2022 probiert, viele Grüß von Schwabeland – Rock Junior Feb 21 '22 at 08:30
  • 1
    @RockJunior Augen aufmachen! Ich habe die Situation für VS2022 in meiner Antwort (unten) bereits beschreiben. – Phil Jollans Feb 22 '22 at 09:32

6 Answers6

74

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.

Phil Jollans
  • 3,605
  • 2
  • 37
  • 50
  • 3
    Thanks, i have tested and it seems to work great, Commit, View History works fine – Daniel Dec 18 '19 at 13:17
  • 1
    Thanks a lot. Working great. This solution should marked as answer. – tslin Jan 03 '20 at 04:23
  • 2
    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 Jan 10 '20 at 11:15
  • Doesn't work for me. So sad. Installed it, but nothing seems to happen.VS version 16.4.1 – mipe34 Jan 22 '20 at 14:58
  • 6
    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**. – Phil Jollans Jan 22 '20 at 23:06
  • 1
    Great, Thanks a lot! – jotbek Feb 05 '20 at 12:27
  • I'm using VS Community 2019 Ver. 16.8.6 and it doesnt recognized the svn repo. VS prompts extension stopped responding – BHP Mar 01 '21 at 06:47
  • Great help! thanks a lot. – RotatingWheel Jan 14 '22 at 09:17
14

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).

bahrep
  • 29,961
  • 12
  • 103
  • 150
gigios
  • 157
  • 4
  • My Manifest has 15.0.25904.0 and – Rock Junior Apr 05 '19 at 12:43
  • I have downloaded directly the last available version from the Visual Studio Marketplace: https://marketplace.visualstudio.com/items?itemName=vs-publisher-303797.AnkhSVN-SubversionSupportforVisualStudio 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). – gigios Apr 08 '19 at 12:14
  • 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 – Rock Junior Apr 08 '19 at 12:49
  • 4
    This is very strange. If you want try to download my version: http://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. – gigios Apr 08 '19 at 13:03
  • 1
    Now it is no more strange, it is working through your Installer. Thanks very much – Rock Junior Apr 08 '19 at 13:31
  • 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. – Johan Danforth Jun 14 '19 at 12:26
  • 1
    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. :( – Louis Jul 03 '19 at 19:52
  • 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 Jul 25 '19 at 21:03
  • 1
    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. – Kvasi Aug 21 '19 at 14:12
  • Additional changes needed in `extension.vsixmanifest` ` ` – Nasenbaer Sep 01 '19 at 18:22
  • See https://stackoverflow.com/a/59335391/461444 answer for a out of box working solution ! – AFract Jan 10 '20 at 11:16
8

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
vik_78
  • 1,107
  • 2
  • 13
  • 20
  • this is Manifest.json has 15.0.25904.0 and another one is – Rock Junior Apr 05 '19 at 12:47
  • @RockJunior if it doesn't have the second number - it's OK. So [15.0.25904.0,) - should work – vik_78 Apr 05 '19 at 12:54
  • 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) – Rock Junior Apr 05 '19 at 14:09
  • 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 – vik_78 Apr 05 '19 at 14:24
  • 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,version" – Rock Junior Apr 08 '19 at 06:52
  • @RockJunior No. "Microsoft.VisualStudio.Component.CoreEditor" should be changed to "[15.0.)". gigios answer is correct also and has good details about files – vik_78 Apr 08 '19 at 08:35
  • Yes I did but still does not work, Do you have this VS2019 Installed? i tried a lot – Rock Junior Apr 08 '19 at 11:20
  • @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. – vik_78 Apr 08 '19 at 12:48
  • @JohanDanforth looks like they are [still working](https://stackoverflow.com/questions/55531597/installation-of-ankhsvn-visual-studio-2019/55533335?noredirect=1#comment99383379_56141316) of support VS2019 – vik_78 Jun 14 '19 at 13:21
  • 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 Jul 25 '19 at 21:03
  • @vik_78 yes, editor (using VS 2017) was closed before zipping. – Conrad Jul 29 '19 at 19:47
7

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.

bahrep
  • 29,961
  • 12
  • 103
  • 150
6

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://learn.microsoft.com/en-us/visualstudio/extensibility/synchronously-autoloaded-extensions?view=vs-2019

A.Nonymous
  • 61
  • 1
4

AnkhSVN supports Visual Studio 2019 now. Download here https://marketplace.visualstudio.com/items?itemName=simonp.AnkhSVN-SupportVS2019 [broken link]

Seems to still be active on GitHub: github.com/simonp22/AnkhSVN

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 https://github.com/simonp22/AnkhSVN

Revious
  • 7,816
  • 31
  • 98
  • 147
Tinker
  • 49
  • 1
  • 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: https://devblogs.microsoft.com/visualstudio/updates-to-synchronous-autoload-of-extensions-in-visual-studio-2019/?utm_source=vs_developer_news&utm_medium=referral – Yogi May 27 '19 at 12:15
  • 1
    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. – bpeikes May 30 '19 at 17:20
  • 1
    Seems to still be active on GitHub: https://github.com/simonp22/AnkhSVN Last commit mentions start of work on background loading. – Gary May 31 '19 at 09:26
  • 5
    I get *We're sorry, the page you requested cannot be found!* – jumbo Jun 07 '19 at 07:55
  • 1
    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 Jun 17 '19 at 13:31
  • 3
    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: https://github.com/simonp22/AnkhSVN/issues/9 – Yogi Jun 19 '19 at 21:30