none
publish in vb.net

    Question

  • I have a call to the mediaPlayer in my project (to play a wav file). While publishing the project, vb.net does not include this wav file to the applications file and while intalling this wav file is missing. Hence I need to copy it manually.
    How can I make vb.net include this wav file in the intallation?

    Thanks,
    Gil

    Saturday, August 15, 2009 2:12 PM

Answers

  • i use express also..
    i do not know if you have seen anywhere that express is funny , but i did in a few places..
    i finally understand this funniness..
    my properties resizes as it pleases at times, for one, and i have quite a whole lot of other funnies that i have to deal with..
    i am not willing to pay top dollar for vb.net pro, if it is funny also.
    sometimes reinstalling, fixes these funnies, for some time, then they occur again..
    i think publishing a lot triggers funnies also, not sure..

    the above is just my opinion, nothing else.

    trujade.

    i like: VB General   google   fast cars   username password
    • Marked as answer by Xingwei Hu Friday, August 21, 2009 6:06 AM
    Thursday, August 20, 2009 5:58 AM

All replies

  • have you tried adding it to your application's resources?
    file menu, project/properties, resources tab. top section,little dropdown arrow next to the Add Resource button/Add Existing File...

    trujade.
    i like: VB General  google  fast cars  username password
    • Proposed as answer by FthrJACK Tuesday, August 18, 2009 2:53 PM
    Saturday, August 15, 2009 2:29 PM
  • Apart from adding it to resources, you can just put the file in your program directory with your executable file.

    kaymaf


    I hope this helps, if that is what you want, just mark it as answer so that we can move on
    • Marked as answer by dspmagic Sunday, August 16, 2009 10:53 PM
    • Unmarked as answer by dspmagic Sunday, August 16, 2009 10:53 PM
    Saturday, August 15, 2009 2:44 PM
  • Hello dspmagic,
    Can you please write the line of code that you use to read the WAV file? This could help to determine the best way to solve your problem by either using trujade's approach or by adding it to windows installer setting and choose the place of it when the program is installed.

    Waleed El-Badry Teaching Assistant Faculty of Engineering Misr University for Science & Technology
    Saturday, August 15, 2009 7:34 PM
  • Thanks Waleed,
    Indeed I tried trujade's approach with both Persistence options: "Embedded in .resx" as well as "Linked at compile time".
    Unfortunatelly none on them worked.
    Here is the line of code I am using:

              My

     

    .Computer.Audio.Play("Do.wav")

    Thanks again
    --Gil

    Monday, August 17, 2009 9:16 PM
  • this is what i use for playing wav's from resources..

    My.Computer.Audio.Play(My.Resources.trujade, AudioPlayMode.Background)

    how and when exactly do you want to play this wav file?
    trujade.

    i like: VB General  google  fast cars  username password
    Monday, August 17, 2009 9:19 PM
  • I have a kind of timer application and I want to play the wav file under timer condition (timer reach zero). I want to have only the sound to be played without opening any actual application window (e.g. do not want the media player window to show up).
    Monday, August 17, 2009 9:26 PM
  • trujade,

    I tried your use form

       My

     

    .Computer.Audio.Play(My.Resources._DO, AudioPlayMode.Background)

    after adding the file do.wav to the resources.
    However after installing the program in another computer, I still get the error message of file not found related to the "do.wav".
    I am probably still do something wrong. Is there anything else I need to do, maybe while publishing, to make the wav file be found by the application?

    Monday, August 17, 2009 10:40 PM
  • dspmagic,
    it seems like there is a bug in your vb.net..
    this should not occur..
    a file in the resources is a part of the application.. cannot be edited after it is compiled..

    suggestion..
    save all of your projects in a folder of yours, not the default for the vb.net, and try repairing/reinstalling vb.net..
    i cannot think of any other reason for this to occur..
    trujade.
    i like: VB General  google  fast cars  username password
    Monday, August 17, 2009 10:54 PM
  • One more question before I go for un-install and re-install:
    When I go through the publish process, a "publish" folder is generated, in which the install file reside as well as "he" folder where the "Back Timer.resources.dll" file reside.
    In addition, a folder called "resources" is being generated in parallel directory hierarchy level as the "publish" folder.
    Is this the way it should be? if not, I still may be doing something wrong. If yes, then how should I treat the "resources" folder when deploying (installing) the project?

    One more question,
    in the "bin/release" directory, a folder called "app.publish" is being generated. How do I suppose to relate to this?

    Thanks a lot,
    --Gil
    Wednesday, August 19, 2009 11:34 PM
  • dspmagic.. quick question..
    are you using express or pro?
    trujade.
    i like: VB General  google  fast cars  username password
    Thursday, August 20, 2009 1:16 AM
  • express
    Thursday, August 20, 2009 5:36 AM
  • i use express also..
    i do not know if you have seen anywhere that express is funny , but i did in a few places..
    i finally understand this funniness..
    my properties resizes as it pleases at times, for one, and i have quite a whole lot of other funnies that i have to deal with..
    i am not willing to pay top dollar for vb.net pro, if it is funny also.
    sometimes reinstalling, fixes these funnies, for some time, then they occur again..
    i think publishing a lot triggers funnies also, not sure..

    the above is just my opinion, nothing else.

    trujade.

    i like: VB General   google   fast cars   username password
    • Marked as answer by Xingwei Hu Friday, August 21, 2009 6:06 AM
    Thursday, August 20, 2009 5:58 AM
  • i just love some of the marked answers on this forum.. roflmao..
    trujade.
    i like: VB General  google  fast cars  username password
    Friday, August 21, 2009 6:27 AM