question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VisualStudio WakaTime extension on M1 ARM doesn't work

See original GitHub issue

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?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
leemcmullencommented, Dec 13, 2022

@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 😂:

  • Cloned the repo and opened it in VS version above
  • Was getting a whole bunch of errors on the Dev14 proj so unloaded it
  • Focused on Dev17 proj only (assumed the “17” here aligns with VS version it’s going to be installed in)
  • Added following entry within “source.extension.vsixmanifest” -> “Install Targets”:
    • Identifier: Microsoft.VisualStudio.Community, VersionRange: [17.0,18.0), Product Architecture: arm64
  • Build now failed mentioning product enum issue. Updated all nuget packages to latest versions
  • Now building ok, same loading issue once installed though
  • Updated TargetFramework to 4.8.1
  • Added the following to the csproj file:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|arm64'">
  <DebugType>full</DebugType>
  <PlatformTarget>ARM64</PlatformTarget>
  <OutputPath>bin\arm64\Debug\</OutputPath>
  <DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
  • Went to Configuration Manager and changed the Platform for Debug -> Dev17 to arm64
  • It started showing a warning about a <RuntimeIdentifiers> entry so added the following to the bottom of the csproj:
<PropertyGroup>
  <RuntimeIdentifiers>win-arm64;</RuntimeIdentifiers>
</PropertyGroup>
  • Clean, Build
  • Close VS. Double click the generated vsix within the bin\arm64\Debug directory to install
  • Next time I opened VS, I was prompted for my API Key. One odd thing here actually, I copied my API key from my dashboard settings and it has a waka_ prefix before the rest which looks like a GUID. Copying it with the waka_ prefix didn’t work, an error was returned about an invalid key (sorry didn’t note the actual message). I removed the waka_ prefix though and it was accepted
  • Clicked around in some files, made some edits and observed data coming through to my dashboard 🎉🎉

No idea how this should be worked into the actual repo etc but hopefully it’s useful information and might help some others get unstuck.

0reactions
baskrencommented, Jun 16, 2023

@alanhamlett and @leemcmullen 👍

I just tried the feature/arm64 branch. THANK YOU!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · wakatime/visualstudio-wakatime
Visual Studio plugin for automatic time tracking and metrics generated from your ... VisualStudio WakaTime extension on M1 ARM doesn't work.
Read more >
Troubleshooting
To check the status of your plugins, use the plugins status page. For help with a specific plugin, find your editor below. Adobe...
Read more >
An open source Visual Studio extension for automatic ...
WakaTime for Visual Studio Visual Studio. The open source plugin for productivity metrics, goals, leaderboards, and automatic time tracking.
Read more >
Visual Studio for Mac
WakaTime for Visual Studio for Mac Visual Studio for Mac. The open source plugin for productivity metrics, goals, leaderboards, and automatic time tracking....
Read more >
An open source VS Code extension for automatic ...
WakaTime for VS Code VS Code. The open source plugin for productivity metrics, goals, leaderboards, and automatic time tracking. vscode-wakatime Star Follow ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found