AnkhSVN icon indicating copy to clipboard operation
AnkhSVN copied to clipboard

Unable to cast object of type 'Microsoft.VisualStudio.CommonIDE.Solutions.SolutionPropertyBag' to type 'Ankh.Scc.Native.ICOMPropertyBag'

Open Rand-Random opened this issue 2 years ago • 14 comments

Edit: Since the build artifacts are expired, here a version I downloaded some time ago

Ankh-VSIX-2022.zip

This version should fix the below mentioned issue.


Upon opening one of many solutions I am getting this error. The error happens everytime I open this one solution, other solutions can be opened without an error.

Except the annoyance of closing the message box everytime I open the solution, I don't see any other issues. Everything seems to work eg. commiting/updating and everything else ankh has to offer, just this error message upon opening the solution, nothing more nothing less.

Unable to cast object of type 'Microsoft.VisualStudio.CommonID.Solutions.SolutionPropertyBag' to type 'Ankh.Scc.Native.ICOMPropertyBag'

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)

image

os-version=10.0.22000.0 
vs-version=17.0.32408.312 
svn-version=1.14.1 
sharpsvn-version=1.14001.54.0 
ankh-version=2.9.89.0 

Rand-Random avatar Apr 20 '22 12:04 Rand-Random

Interesting issue. Looks like the code in vs was converted to managed without proper com compatibility... We need a fix there.

rhuijben avatar Apr 24 '22 07:04 rhuijben

Thanks for the very fast fix. I wonder is there some automatic build where I can grab a version with this commit?

Rand-Random avatar May 03 '22 10:05 Rand-Random

If you click on Actions in the project and look at the last successful build, you should see artifacts that you can download... These are vsix packages that can be installed in VS

rhuijben avatar May 03 '22 21:05 rhuijben

If you click on Actions in the project and look at the last successful build, you should see artifacts that you can download... These are vsix packages that can be installed in VS

I just encountered this issue after installing VS 2022 17.2, so I've installed the last successful build and restarted without encountering the issue again.

PS are you planning to publish to Marketplace?

ghost avatar May 13 '22 09:05 ghost

Still an issue in 17.4.3

andrew-tyas-idox avatar Dec 16 '22 12:12 andrew-tyas-idox

@andrew-tyas-idox You installed the latest build of the plugin, as was mentioned in this topic? You may find the currently latest version here: https://github.com/AmpScm/AnkhSVN/actions/runs/3633025147

Rand-Random avatar Dec 16 '22 16:12 Rand-Random

@andrew-tyas-idox You installed the latest build of the plugin, as was mentioned in this topic? You may find the currently latest version here: https://github.com/AmpScm/AnkhSVN/actions/runs/3633025147

Yes, that resolves it. I had installed the latest Release version instead,

andrew-tyas-idox avatar Dec 16 '22 18:12 andrew-tyas-idox

@andrew-tyas-idox You installed the latest build of the plugin, as was mentioned in this topic? You may find the currently latest version here: https://github.com/AmpScm/AnkhSVN/actions/runs/3633025147

Yes, that resolves it. I had installed the latest Release version instead,

TIP: You have to sign up to GitHub and be logged in otherwise the build Artifacts are not downloadable.

martin-belcher avatar Jan 26 '23 17:01 martin-belcher

The ankhsvn package is expired. image

Where can I download the latest update? Thank you.

re14nz avatar Aug 31 '23 10:08 re14nz

@re14nz Click on Actions at the top, navigate to the latest Build Action, ans at the bottom you will find the Artifacts the build produced.

Rand-Random avatar Aug 31 '23 12:08 Rand-Random

Hi,

I have a similar problem, we currently migrating to Visual Studio 2022. From Visual Studio 2012

How can I fix the problem with the Ankh sub-version? errorANkh

ChumaniCodeRR avatar Feb 19 '24 09:02 ChumaniCodeRR

@ChumaniCodeRR Did you actually read the messages here? solution was already posted a couple of times.

Rand-Random avatar Feb 19 '24 10:02 Rand-Random

There are no successful builds where the artifacts are not expired

JesperOlsen avatar Apr 25 '24 07:04 JesperOlsen

@JesperOlsen Not sure why I deserve the thumbs down, isn't like I am doing the builds/artifacts, but okay you do you.

Here a version I downloaded some time ago, give it a try: Ankh-VSIX-2022.zip

Rand-Random avatar Apr 25 '24 08:04 Rand-Random