add mp3 to resource programatically

Hello,
I want to add an mp3 file to resource so that I use that resource later in different applications and extract the needed file from there. I know how to add files using resourcewriter but I don't know how to add mp3 file. How can I do it
thanks


Answer this question

add mp3 to resource programatically

  • Ali Katouzian

    Hello All.

    mcnamaragio:

    Gotcha. Something like a self-extracting transport for .mp3 files Your exe is not going to use the .mp3 files as such Is that correct



  • CarmenM

    Hello All.

    mcnamaragio:

    Okay, let's make sure we're on the same page here. An embedded resource is a file that is compiled into your executable. So, you want to add a file to your project to be included when you compile your application, is that correct And, are you using Visual Studio



  • Larsenal

    I want to add mp3 file as an embedded resource to my application. Or if I have an instance of compileroptions class , then to add the mp3 file as an embedded resource. I know that I can use embeddedresources.add method but will it add mp3 file And how to extract that mp3 file to disk from the compiled exe when it runs Can it be done using resourcemanager

  • kzu

    my apologies if I misunderstood. you can embed any file as an embedded resource file, then extract it like this:

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=885322&SiteID=1

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=863714&SiteID=1



  • Wail_gsm

    Hello All.

    mcnamaragio:

    I'm not sure I understand what you're trying to accomplish. An .mp3 file IS a resource. You can add audio resources to a project using the Resources editor in Visual Studio.

    HTH.



  • Sanchit Bahal

    Did you try File.Copy(filename, @".\filename.mp3");

    This will copy the file to the bin/Debug folder.

    You can also copy it to your Application.StartupPath or a folder within this directory.

    I do not know how to add to resources programmatically, but you could also store the file path in Settings.

    Does this help



  • vitich

    I want to embed an mp3 file into an exe which is to be compiled by my application using csharpcodeprovider. The exe compiled by csharpcodeprovider should be able to extract the embedded mp3 file to disk

  • add mp3 to resource programatically