I figured the biggest hurdle in writing a plugin would be getting everything linked up the first time, and so far I'm not wrong.
I got as far as having the plugin show up in plugins when I start debugging in Visual Studio. I've been following the plugin tutorial from the wiki
, and once I got sorted out with C# instead of VB everything seemed to be going according to plan. Now I've even got a menu item showing up in the Tools menu. Go me!
But two things are going wrong that are keeping me from getting any further. I have no idea if they're related.
1) I thought this problem
was unrelated, but now I wonder. The plugin appears to be enabled - the menu item is showing up! - but it's not showing up in the plugin list at all. If I click on "Add Plugin" and select it, I get a message that it can't be added because it's in use by another program. I don't know whether that other program would be Visual Studio or MusicBee. (I suspect MusicBee because I get the same message if I try to select TagTools, which is already showing up.)
I've tried removing the plugin from the settings file, deleting it from the Plugins folder, restarting MusicBee, Visual Studio, the whole computer... no change. Oh, and made sure I was on the latest patch (I think the error below happened before that update).
2) I added the event handler that is supposed to launch my plugin window when the menu item is selected, but nothing happens. Probably connected, the first time I launched the plugin after adding the methods for the menu item and launching the window, I got an error (I think when I went to the plugins screen in prferences):
11/24/2019 11:40:23 PM - 10.0.18362.0 - 3.3.7261.33657P - System.NullReferenceException: Object reference not set to an instance of an object.
at #=z3Kz1DsoR9bEPUH_6NA==.#=zwUcuNaA=(#=zchKDv5x74SKOR6z6Kp_nr0Eg5lHH #=zgrroQ7Pl_CmD)
at #=zSdSgGhnOdp9Dkq95vHqWuwY=.#=ziZu6TkU=(#=zD_Jap6Jzyc8P1vQqZQ== #=zOB3OmP2Erjcz)
Any guidance on what I might have borked here is appreciated. As far as I know, I hadn't added any code of substance except those two methods, the one that calls MB_AddMenuItem and the event handler for the menu item click. And changes I've made with them since then haven't seemed to have any impact.