Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Rand-Random opened this issue Apr 20, 2022 · 18 comments

Comments

@Rand-Random
Copy link

Rand-Random commented Apr 20, 2022

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.

Version of the provided file:
2.9.120.0
2.9.120-d119c2b3ac9e09a09631eb7801f7450ce5d41c3b

Here a screenshot of the content, after I renamed the containing *.vsix file to *.zip and extraced its content:
image


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 
@rhuijben
Copy link
Member

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

@Rand-Random
Copy link
Author

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

@rhuijben
Copy link
Member

rhuijben commented May 3, 2022

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

@ghost
Copy link

ghost commented May 13, 2022

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?

@andrew-tyas-idox
Copy link

Still an issue in 17.4.3

@Rand-Random
Copy link
Author

@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

@andrew-tyas-idox
Copy link

@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,

@martin-belcher
Copy link

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

@re14nz
Copy link

re14nz commented Aug 31, 2023

The ankhsvn package is expired.
image

Where can I download the latest update?
Thank you.

@Rand-Random
Copy link
Author

Rand-Random commented Aug 31, 2023

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

@ChumaniCodeRR
Copy link

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

@Rand-Random
Copy link
Author

Rand-Random commented Feb 19, 2024

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

@JesperOlsen
Copy link

There are no successful builds where the artifacts are not expired

@Rand-Random
Copy link
Author

Rand-Random commented Apr 25, 2024

@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

@vman2000
Copy link

vman2000 commented Dec 7, 2024

There are no successful builds where the artifacts are not expired

Yes, I couldn't find any that worked. In the end I just downloaded the code a built the solution, and picked the Ankh.Package.vsix out of src\Ankh.Package\bin.

That was quicker than looking for a build and solved the problem perfectly.

@Rand-Random
Copy link
Author

@vman2000
the attached file at the first post didn’t work?

@vman2000
Copy link

vman2000 commented Dec 7, 2024

@vman2000 the attached file at the first post didn’t work?

Honestly, whilst I appreciate you are trying to help and I'm sure its okay, a "here's a version I downloaded some time ago" zip with no version/build info from some guy I dont know on a two year old comment didn't fill me with the same confidence as a quick download and build of the current source.

Its only one extra click to build the latest commit from a known legit source.

@Rand-Random
Copy link
Author

Rand-Random commented Dec 7, 2024

@vman2000
Just to let you know, doesn't help you and may not increase your confidence, but maybe it helps others.
Edited the first post and included the version number + a screenshot of its content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants