"An item with the same key has already been added" when testing a plugin build

I kept getting the error when trying to run my built .sdlplugin in Trados:

"An item with the same key has already been added" 

along with something about CommandBars not working.

Seems silly now, but turns out if you try to build the same .sdlplugin here:

C:\Users\[Username]\AppData\Roaming\SDL\SDL Trados Studio\[version #]\Plugins\Packages

when you already have been building here:

C:\ProgramData\SDL\SDL Trados Studio\[version #]\Plugins\Packages

Then you cannot run your plugin in Trados.

Delete one of the .sdlplugin files from either location, probably the location that you don't have set as your build path, and delete the unpacked version from the Unpacked folder one directory up from Packages.

Then you should  be able to run your plugin again. Not really a question but fyi for those of you who run into this situation in the future.