It is currently April 25th, 2024, 9:35 am

Referencing TagLib in own C# Plugin

Share and get help with Plugins and Addons
ff91
Posts: 2
Joined: June 29th, 2014, 1:14 pm

Referencing TagLib in own C# Plugin

Post by ff91 »

Hi everybody,
i have been trying to write myself a simple plugin to read Lyrics from the ID3Tag of MP3 files.
To accomplish that, I am using the TagLib Sharp library, which I imported with NuGet.
My problem is now, that as soon as I work with TagLib in my plugin, Rainmeter crashes with a System.IO.FileNotFoundException, because it does not find the reference anymore, even though I copied the taglib-sharp.dll from the outputdir into the Rainmeter/Plugins directory along with my own plugin-dll.

I think I need to merge the dlls in some way, but I could not get ILMerge or anything like that to work.

Does somebody here have any idea what I am doing wrong?
I'd be glad for any hint

Cheers guys
User avatar
.raptor
Posts: 220
Joined: April 3rd, 2013, 11:03 pm
Location: Norway

Re: Referencing TagLib in own C# Plugin

Post by .raptor »

From my experience, merging dll's is not a good way to do things.
I don't really understand what you would need NuGet for either (DISCLAIMER: I have no idea how NuGet works, beyond their overview).
The taglib-sharp source is available for github, so you could just build it directly into your project with no external dll's needed.

If you for any reason want to stay with the external dll, just try to import it manually.
Also, this seems to be more of a stackoverflow question then a rainmeter question, as i have serious doubts this has anything to do with rainmeter.
ff91
Posts: 2
Joined: June 29th, 2014, 1:14 pm

Re: Referencing TagLib in own C# Plugin

Post by ff91 »

Thanks for the reply,
when I tried to compile the taglib-sharp source in the beginning I got a couple of errors, but it did work when I used nuGet in VisualStudio to import it.

What you are saying makes sense though, so I will try again to add the source to my project.
Also you are right that this might rather go to stackoverflow, I just thought that somebody in here must have run into the same problem at some point, when trying to use 3rd party libraries in their plugins ;)

If I run into any other problems I will ask over there then,
Cheers mate