visualstudio-wakatime: VisualStudio WakaTime extension on M1 ARM doesn't work
Hi,
I just upgraded to Visual Studio 2022 on MacBook Pro M1 Max (ARM) using Parallels.
Unfortunately, WakaTime extension throws an error every time I open Visual Studio. Here are the details:
Create Instance failed for package [WakaTimePackage] Source: 'mscorlib' Description: Could not load file or assembly 'file:///c:\users\test\appdata\local\microsoft\visualstudio\17.0_45d60efe\extensions\44g3sfld.gyw\WakaTime.Dev17.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. System.BadImageFormatException: Could not load file or assembly 'file:///c:\users\test\appdata\local\microsoft\visualstudio\17.0_45d60efe\extensions\44g3sfld.gyw\WakaTime.Dev17.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'file:///c:\users\test\appdata\local\microsoft\visualstudio\17.0_45d60efe\extensions\44g3sfld.gyw\WakaTime.Dev17.dll' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence) 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].
Is there any workaround for this and when can we expect official support for ARM processors?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 19 (8 by maintainers)
Can you share the process?For anyone else looking for an answer, hereās what I did:
feature/arm64bin\arm64\DebugOnce installer is finished, you WakaTime should prompt you for an API key.
@alanhamlett @gandarez @tpesl
Ok, good news, Iāve got it working in VS Community 2022 (ARM 64-bit) version 17.4.2 running on Windows 11 within Parallels on a MBP M1 šš
I did the following steps in this order. Caveat: Iāve never done any extension dev and was just feeling my way around in the dark really! So some of this might not have been/probably wasnāt required/necessary š:
Microsoft.VisualStudio.Community, VersionRange:[17.0,18.0), Product Architecture:arm64arm64<RuntimeIdentifiers>entry so added the following to the bottom of the csproj:bin\arm64\Debugdirectory to installwaka_prefix before the rest which looks like a GUID. Copying it with thewaka_prefix didnāt work, an error was returned about an invalid key (sorry didnāt note the actual message). I removed thewaka_prefix though and it was acceptedNo idea how this should be worked into the actual repo etc but hopefully itās useful information and might help some others get unstuck.