Closed DrMaester closed 3 years ago
We're also getting this issue on the latest version of AnkhSVN, but older versions work fine.
Same error for me... How can i install previous version? thank you
You can try downloading it here https://ankhsvn.open.collab.net/daily/2.7.x
Do you have VS 2019 installed as well? Trying to track down the root cause. We just switched to a new buildsystem and are trying to get things up and running again in this Open source project.
We're using Visual Studio Professional 2017 - Version 15.9.36
You can try downloading it here https://ankhsvn.open.collab.net/daily/2.7.x
Thank you for reply, but i need .vsix extension to install in visual studio... I can't install with .msi file... Can you help me?
You can try downloading it here https://ankhsvn.open.collab.net/daily/2.7.x
Thank you for reply, but i need .vsix extension to install in visual studio... I can't install with .msi file... Can you help me?
We're trying to figure out how to downgrade as well, that msi file didn't work for us either. We just have multiple people running the extension and all the one's that haven't updated work fine.
Same issue here. I have VS 2005, VS 2010, and VS 2017 installed (no VS 2019). The crash only appears to happen in VS 2017. As @AndreaTalentum states, the supplied link to the .msi does not install the extension to VS 2017.
Here's the error we're getting (in English)
It looks like a specific file / dependency is missing.
CreateInstance failed for package [AnkhSVN - Subversion Support for Visual Studio]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo) at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Visual Studio 2017 and 2019 need a .vsix file. The .msi files work only for older versions. We just released a first official version for 2017 and 2019, but it appears the 2017 support is broken.
Help debugging would be welcome. (Just open the .sln from GitHub with either git or via GitHub's subversion support on https://github.com/AmpScm/AnkhSVN/trunk )
I'm trying to setup a VM to diagnose this further myself, but may take a bit.
Tried opening the solution in VS2017, it won't build for me. I've never worked on Extensions for VS so I have no idea what I'm doing. Lots of *** is not compatible with net46 errors.
@rhuijben I tried the latest 2.9.48 build from here https://github.com/AmpScm/AnkhSVN/actions/runs/850508145, but it still did not work. Here's the error:
CreateInstance failed for package [AnkhSVN - Subversion Support for Visual Studio]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo) at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
@rhuijben Changing this line from v4.6 to v4.7.2 fixed the compile errors, and the extension no longer crashes upon launching VS, but hitting 'update' from the pending changes window makes an error window in VS pop up, which says this:
System.InvalidOperationException: Due to high risk of deadlock you cannot call GetService from a background thread in an AsyncPackage derived class. You should instead call GetServiceAsync (without calling Result or Wait on the resultant Task object) or switch to the UI thread with the JoinableTaskFactory.SwitchToMainThreadAsync method before calling GetService. at Microsoft.VisualStudio.Shell.AsyncPackage.GetService(Type serviceType) at Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type serviceType) at Ankh.AnkhRuntime.GetService[T](Type type) at Ankh.AnkhRuntime.GetService[T]() at Ankh.AnkhService.GetService[T]() at Ankh.Commands.SolutionUpdateCommand.PerformUpdate(CommandEventArgs e, ProgressWorkerArgs wa, SvnRevision rev, Boolean allowUnversionedObstructions, Boolean updateExternals, Boolean setDepthInfinity, IEnumerable`1 groups, SvnUpdateResult& updateResult) at Ankh.Commands.SolutionUpdateCommand.<>c__DisplayClass6_1.
b__0(Object sender, ProgressWorkerArgs a) at Ankh.ProgressRunnerService.ProgressRunner.Run(Object arg)
Any chance of downgrading? this is a huge pain?
I have an update ready. As I think it resolves the issue while having minimal impact for VS2019 users I'm going to publish it now.
Can you please reply with your results? Thanks for your help!
The updated version is AnkhSVN 2.9.50 and should be live on the update site now.
Any chance of downgrading? this is a huge pain?
The VS site doesn't support a proper downgrade and the reason we didn't deliver VS2019 support earlier was that our build system didn't support providing stable releases for these versions.
All the scripting is in this public GitHub repository now... so I'm verry sorry that this happened, but once we get this fixed all the development can be done publicly right here... and everybody can help (or just pick old versions from the actions tab if they need them)
Does not crash on loading, but as before when I got it to compile successfully, hitting 'update' from pending changes gives this error:
System.InvalidOperationException: Due to high risk of deadlock you cannot call GetService from a background thread in an AsyncPackage derived class. You should instead call GetServiceAsync (without calling Result or Wait on the resultant Task object) or switch to the UI thread with the JoinableTaskFactory.SwitchToMainThreadAsync method before calling GetService. at Microsoft.VisualStudio.Shell.AsyncPackage.GetService(Type serviceType) at Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type serviceType) at Ankh.AnkhRuntime.GetService[T](Type type) at Ankh.AnkhRuntime.GetService[T]() at Ankh.AnkhService.GetService[T]() at Ankh.Commands.SolutionUpdateCommand.PerformUpdate(CommandEventArgs e, ProgressWorkerArgs wa, SvnRevision rev, Boolean allowUnversionedObstructions, Boolean updateExternals, Boolean setDepthInfinity, IEnumerable`1 groups, SvnUpdateResult& updateResult) at Ankh.Commands.SolutionUpdateCommand.<>c__DisplayClass6_0.
b__0(Object sender, ProgressWorkerArgs a) at Ankh.ProgressRunnerService.ProgressRunner.Run(Object arg)
I have an update ready. As I think it resolves the issue while having minimal impact for VS2019 users I'm going to publish it now.
Can you please reply with your results? Thanks for your help!
Still having issue with the update. Receive an error upon opening VS (not opening a solution). VS 2017 (15.9.21) What is probably the important bit of the ActivityLog.xml generated by the error:
<entry>
<record>656</record>
<time>2021/05/17 20:11:08.707</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [AnkhSVN - Subversion Support for Visual Studio]Source: 'mscorlib' Description: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Due to high risk of deadlock you cannot call GetService from a background thread in an AsyncPackage derived class. You should instead call GetServiceAsync (without calling Result or Wait on the resultant Task object) or switch to the UI thread with the JoinableTaskFactory.SwitchToMainThreadAsync method before calling GetService.
 at Microsoft.VisualStudio.Shell.AsyncPackage.GetService(Type serviceType)
 at Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type serviceType)
 at Ankh.AnkhRuntime.GetService[T](Type type)
 at Ankh.AnkhRuntime.GetService[T]()
 at Ankh.AnkhRuntime..ctor(IServiceContainer parentContainer)
 at Ankh.VSPackage.AnkhSvnPackage..ctor()
 --- End of inner exception stack trace ---
 at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
 at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
 at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
 at System.Activator.CreateInstance(Type type, Boolean nonPublic)
 at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
 at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
 at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
 at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)System.InvalidOperationException: Due to high risk of deadlock you cannot call GetService from a background thread in an AsyncPackage derived class. You should instead call GetServiceAsync (without calling Result or Wait on the resultant Task object) or switch to the UI thread with the JoinableTaskFactory.SwitchToMainThreadAsync method before calling GetService.
 at Microsoft.VisualStudio.Shell.AsyncPackage.GetService(Type serviceType)
 at Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type serviceType)
 at Ankh.AnkhRuntime.GetService[T](Type type)
 at Ankh.AnkhRuntime.GetService[T]()
 at Ankh.AnkhRuntime..ctor(IServiceContainer parentContainer)
 at Ankh.VSPackage.AnkhSvnPackage..ctor()</description>
<guid>{604AD610-5CF9-4BD5-8ACC-F49810E2EFD4}</guid>
<hr>80004005 - E_FAIL</hr>
<errorinfo></errorinfo>
</entry>
Hello, i tried your update but the problem remain. I tried older version from the Action Tab nothing change the crash continue.
Greetings! I have the same issue on VS2017 even with the version 2.9.50 The problem raises when hitting update button. When history button is hit then nothing is showed
Please help.
I successfully built and installed an older version of the package, and it is working.
To prevent it from automatically updating, you need to make sure to uncheck this option BEFORE installing the old version, or else it will automatically update it the first time you launch VS after installing it. (Uncheck the 'Automatically Update Extensions' checkbox)
Here's the file. Hope it works for everyone until the latest version gets compatibility with VS 2017
A .51 package is posted with fixes for the Update command and the new initialization problem explicitly reported against the new version (but which I'm unable to reproduce).
A few newer packages are available via the Actions page here with cases that might help in less common commands.
Hello, good news. The package .51 available in the action tab fix the issue here. Thank you
Thanks for confirming. Waiting for a few others to confirm as well before closing this issue. Please feel free to open new issues if you find them.
It seems to be working now. Thanks.
Extension suddenly cannot be loaded. My Visual Studio Version: 15.9.36 Extension Version: 2.9.37 Extracted from ActivityLog.xml:
80004005 - E_FAIL