wakatime / visualstudio-wakatime

Visual Studio plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/visual-studio
BSD 3-Clause "New" or "Revised" License
334 stars 62 forks source link

Does not work with VS2015 #125

Closed zolakt closed 2 years ago

zolakt commented 2 years ago

There has been a similar issue reported here https://github.com/wakatime/visualstudio-wakatime/issues/109

It is supposed to work with v11, but it doesn't, at least not for me.

It was working a while ago, it no longer does. I've tried uninstalling/installing multiple times. When I go to Tools->WakaTime->Settings it doesn't open any window.

In the ActivityLog.xml, I've found this:

` CreateInstance failed for package [WakaTimePackage]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.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=15.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=15.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].

{52D9C3FF-C893-408E-95E4-D7484EC7FA47} ` Is this really expected to work with VS2015, since it requires Microsoft.VisualStudio.Shell.15.0? Isn't Microsoft.VisualStudio.Shell.15.0 a VS2017 package? e.g. there is a similar discussion here about a different extension, with the same exception https://stackoverflow.com/questions/46054343/visual-studio-2015-fail-to-load-package-because-microsoft-visualstudio-shell-15 It seems like it needs Microsoft.VisualStudio.Shell.14.0 in order to work for VS2015. Is there a way to install an older version, which targets the older lib version?
alanhamlett commented 2 years ago

Yes, looks like when trying to support VS 2022 we had to upgrade to Microsoft.VisualStudio.Shell.15.0 since VS 2022 won't work with Microsoft.VisualStudio.Shell.14.0.

Is there a way to install an older version, which targets the older lib version?

Here's the list of older versions: https://github.com/wakatime/visualstudio-wakatime/releases

@gandarez do you have any input on this?

gandarez commented 2 years ago

I'm still looking for a fix. First I need to confirm how's the lib is referenced and why this specific version is not working on 2015. I'll bring more details soon.

alanhamlett commented 2 years ago

@zolakt can you confirm which version of the plugin you have installed?

zolakt commented 2 years ago

I've just installed the latest from VS2015 (it doesn't let me choose a version). So it's 11.1.0

Can someone tell me what is the last version that references Microsoft.VisualStudio.Shell.14.0? Is 10.3.1 ok?

zolakt commented 2 years ago

10.0.3 seem to work, at first, but it's not sending any data. The settings window is working again. Everything seems fine, but it doesn't send anything. I've enabled debug. There is no .wakatime.log file in the user folder. Only .wakatime.cfg

Any suggestions?

gandarez commented 2 years ago

Please uninstall current extension and find for wakatime on the gallery to install a new version.

ErivandoBR commented 2 years ago

Please uninstall current extension and find for wakatime on the gallery to install a new version.

I tested the new update (13.0.0) it is working in visual studio 2015 (and 2022), thanks.