AnkhSVN
AnkhSVN copied to clipboard
Exception in Visual Studio 2022 (version 17.2.0) when opening a solution that uses AnhSvn
I've successfully used AnkhSVN version 2.9.87 with Visual Studio 2022 (internal version < 17.2). Now I've updated to VS2022 version 17.2. When I now open a solution file that uses AnkhSvn I get this exception:
System.InvalidCastException: Unable to cast object of type 'Microsoft.VisualStudio.CommonIDE.Solutions.SolutionPropertyBag' to type 'Ankh.Scc.Native.ICOMPropertyBag'.
at Ankh.VSPackage.AnkhSvnPackage.ReadSolutionProps(IVsHierarchy pHierarchy, String pszProjectName, String pszProjectMk, String pszKey, Int32 fPreLoad, IPropertyBag pPropBag)
Afterwards Visual Studio freezes.
I am receiving the same error, but I'm able to continue working and even Ankh seems to be working ok.
Additionally i get a message that "One or more project in the solution were not loaded correctly". But I cannot an unloaded project though. In the output window from "Solution" i get the message: "Some of the properties associated with the solution could not be read."
I am not sure if this is related to AnkhSVN.
I rebuilt the package with latest Microsoft.VisualStudio.OLE.Interop package and that seem to solve the issue.
This appears to be the same issue as https://github.com/AmpScm/AnkhSVN/issues/44
After reading #44 I tried the vsix from the MSBuild 121 action and can confirm that I no longer get the exception.
Yes, after #44 now is working, thanks