Results 1 to 6 of 6

Thread: .NET Bundle .txt file with setup

  1. #1
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default .NET Bundle .txt file with setup

    I have to run. I've been looking this up for the last two hours and it is probably staring me in the face.

    I've got a small app that will be deployed with the clickonce crap. All I want to do is bundle a couple plain text files that go into whatever the working directory is (or a directory I can access). I don't want them compiled into a .dll. I can't figure out for the life of me what I'm missing here.

    I can set the files as content, and I can find them in the convoluted mess of appdata folders clickonce puts them in, but I can't figure out how to get to that directory so I can open them.

    Just want a button that when I click opens that file in whatever the user has for a texteditor. I can make that call with System.Diagnostics.Process.Start(readme); but I can't find the path in which it puts things.

    Bleh, have to run. I'm probably blind. Either way they make it seem more difficult than it should be to bundle a simple set of text files with something. I can make them at runtime all day long, but bundling one appears to be some kind of unspeakable horror.

  2. #2
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: .NET Bundle .txt file with setup

    Jeez, how hard is it to bundle a fricken untouched file and let me know where the heck it puts it.

    Plenty of people asking the same question on the internet and I can't find a single answer.

  3. #3
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: .NET Bundle .txt file with setup

    I gave up on trying to figure out how to get into the resources folder once it was installed and put the files directly under the namespace in the list so that way they would be in the directory of the exe.

    I then had issues with the setup not making the changes I've made when installing an new version, only to realize I hadn't incremented the version number so it thought it was the same as the old one. Bleh, not enough sleep, and too much thought.

    I'll leave this in case any one else has issues, or I come up with something else.

  4. #4
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: .NET Bundle .txt file with setup

    Great. Now I decide to check what happens when a new version overwrites the old version. Well, it doesn't overwrite the old version. It keeps both. It just points the shortcut to the newest one.

    So all the files the program/user creates in the directory of the exe doesn't carry over to the new one. wtf. This clickonce crap is causing more headaches than its worth. Now I have to go back and create a folder on C, so the damn thing will recognize files created from older versions. BBBLLLLLARRRGGGHGHGHGHGh.

    This is what I get for trying to use something automated instead of doing every single thing myself.

  5. #5
    Unlocked/Overclocked/Never Stock
    Join Date
    Sep 2010
    Location
    Tennessee
    Posts
    250

    Default Re: .NET Bundle .txt file with setup

    We now return you to "The Secret Life of Software Developers:"

    Quote Originally Posted by NightrainSrt4 View Post
    BBBLLLLLARRRGGGHGHGHGHGh.
    Ah, we are in for a treat tonight, folks. That sound you just heard is the anguished cry of a Frustrated Software Developer. Now, it's generally believed that this cry is used when a Developer is engaged in mortal combat with one of their few natural predators: a Poorly-Designed Development Platform. Aside: Bob, can you get a close-up on this? From what I can tell, this platform is of the genus Microsoftus, specifically the dotnettia variety. It's said that - what's that, Bob? The developer saw us? Is he - oh crikey, he's charging us! Run, Bob, r-<static>

    Sorry to hear your having trouble with your project. I haven't developed in .NET in quite some time, so I'm not sure how to help you out, but you would think that would be a fairly commonplace thing to do. Anyway, hope this gave you a laugh. I know I've been in similar situations where I could've used one.
    http://folding.extremeoverclocking.c...e.php?u=555808

    Quote Originally Posted by RogueOpportunist View Post
    In my experience the vast majority of "tech problems" are ID-10-T errors, usually caused by a nut loose on the keyboard.

  6. #6
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: .NET Bundle .txt file with setup

    Haha, thanks. It did. I'm only using it to branch out. It always seems to me like the simplest things are the least documented.

    It isn't a difficult fix. I just have to save my data files to a different location than the executable. It's just a pain. I don't understand why it writes a whole new directory instead of just updating the files that have changed. The funny thing was the last version I wrote had all this. This time around I figured I'd try and see how it handled things on its own.

    I still can't figure out how to get to the resources that aren't placed directly in the executable's folder but still in the clickonce set of directories. It seems like they want you to always bundle it into the exe/dll and then extract it. Seems silly for simple text files that don't need to be protected.

    I've calmed down now, well I've gotten sick, so my mind is a bit more clear. I just find it hilarious that complicated data structures are all done and there for you to use. No need to reinvent the wheel there, but you still have to write your own functions to send data to a printer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •