Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. delete

delete

Scheduled Pinned Locked Moved C#
11 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N nhqlbaislwfiikqraqnm

    delete

    M Offline
    M Offline
    Manas Bhardwaj
    wrote on last edited by
    #2

    For the xml file, you can use Build Action as Embedded Resource. But this means that you will have to change the way you read the xml file now. You will have to read it from the assembly. For Dlls, do you have the source code?

    Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

    N 1 Reply Last reply
    0
    • N nhqlbaislwfiikqraqnm

      delete

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #3

      PC17 wrote:

      must be in the same folder otherwise the program doesn´t work

      That's not entirely true. You can probably embed the XML in the EXE as a resource. If you wanted the EXE and DLLs in one file, why did you make the DLLs?

      N 1 Reply Last reply
      0
      • M Manas Bhardwaj

        For the xml file, you can use Build Action as Embedded Resource. But this means that you will have to change the way you read the xml file now. You will have to read it from the assembly. For Dlls, do you have the source code?

        Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        N Offline
        N Offline
        nhqlbaislwfiikqraqnm
        wrote on last edited by
        #4

        yes i have the source code can you explain me how that careful work with the xml how i must drop it and how can i open it? pc17

        D 1 Reply Last reply
        0
        • P PIEBALDconsult

          PC17 wrote:

          must be in the same folder otherwise the program doesn´t work

          That's not entirely true. You can probably embed the XML in the EXE as a resource. If you wanted the EXE and DLLs in one file, why did you make the DLLs?

          N Offline
          N Offline
          nhqlbaislwfiikqraqnm
          wrote on last edited by
          #5

          That i can use it for more things so i have no very long source code! Who would this work with the resoucen i take the 4 files as resouce and then how can i open it? PC17

          P 1 Reply Last reply
          0
          • N nhqlbaislwfiikqraqnm

            yes i have the source code can you explain me how that careful work with the xml how i must drop it and how can i open it? pc17

            D Offline
            D Offline
            DaveyM69
            wrote on last edited by
            #6

            If the dlls are written in C# and you have the source then you can do it this way:

            Create backups of everything - just in case!
            Open the project that is compiled to the exe.
            In that solution, choose Add Existing Project for each of the projects that compile to dll and add each one.
            Create folders with the same names as the dll projects in the exe one.
            Select all files in each dll project and drag and drop to the respective folder.
            Remove the dll projects from the solution.

            You may have to play around a little if any of the projects are using a resources file etc, but generally speaking it should just work.

            Dave
            Generic BackgroundWorker - My latest article!
            BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
            Why are you using VB6? Do you hate yourself? (Christian Graus)

            P 1 Reply Last reply
            0
            • D DaveyM69

              If the dlls are written in C# and you have the source then you can do it this way:

              Create backups of everything - just in case!
              Open the project that is compiled to the exe.
              In that solution, choose Add Existing Project for each of the projects that compile to dll and add each one.
              Create folders with the same names as the dll projects in the exe one.
              Select all files in each dll project and drag and drop to the respective folder.
              Remove the dll projects from the solution.

              You may have to play around a little if any of the projects are using a resources file etc, but generally speaking it should just work.

              Dave
              Generic BackgroundWorker - My latest article!
              BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
              Why are you using VB6? Do you hate yourself? (Christian Graus)

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #7

              Yes, but... I create the directory first and add right into it and I usually Add as link so I don't copy the files needlessly.

              1 Reply Last reply
              0
              • N nhqlbaislwfiikqraqnm

                That i can use it for more things so i have no very long source code! Who would this work with the resoucen i take the 4 files as resouce and then how can i open it? PC17

                P Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #8

                PC17 wrote:

                That i can use it for more things

                Consider putting the DLLs in the GAC.

                1 Reply Last reply
                0
                • N nhqlbaislwfiikqraqnm

                  delete

                  L Offline
                  L Offline
                  Luc Pattyn
                  wrote on last edited by
                  #9

                  When all code is C#, you could create a single project holding all the source files; and add the XML file to it, with BuildAction=EmbeddedResource. Then you need a bit of code to extract the XML as a string, replacing your file reading code. :)

                  Luc Pattyn


                  Local announcement (Antwerp region): Lange Wapper? Neen!


                  1 Reply Last reply
                  0
                  • N nhqlbaislwfiikqraqnm

                    delete

                    M Offline
                    M Offline
                    Mirko1980
                    wrote on last edited by
                    #10

                    For the xml file, add it as an EmbeddedResource as others have already said. For the dlls, can use ILMerge to merge them with your exe.

                    N 1 Reply Last reply
                    0
                    • M Mirko1980

                      For the xml file, add it as an EmbeddedResource as others have already said. For the dlls, can use ILMerge to merge them with your exe.

                      N Offline
                      N Offline
                      nhqlbaislwfiikqraqnm
                      wrote on last edited by
                      #11

                      So now i have the xml file in it! But the dll´s not! When i merge it it doesn´t can load all 3 dll files only one i can load?!

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups