Include xml file in build output

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rob Tillie

    #1

    Include xml file in build output

    Hello,

    I want an xml file, part of the project, be included in the build so that it
    gets to debug/bin.
    I already set the build action "content", which describes what I want, but
    vs.net doesn't deploy it.

    Anyone got an idea?

    Greetz,
    -- Rob.


  • Lee Falin

    #2
    Include xml file in build output

    You need to make sure you add a custom action to the
    deployment project that will include the XML file.

    -Lee
    [color=blue]
    >-----Original Message-----
    >Hello,
    >
    >I want an xml file, part of the project, be included in[/color]
    the build so that it[color=blue]
    >gets to debug/bin.
    >I already set the build action "content", which describes[/color]
    what I want, but[color=blue]
    >vs.net doesn't deploy it.
    >
    >Anyone got an idea?
    >
    >Greetz,
    >-- Rob.
    >
    >
    >.
    >[/color]

    Comment

    • Rob Tillie

      #3
      Re: Include xml file in build output

      Hello,

      I don't mean when I'm deploying the app, but just in my Visual Studio IDE. I
      have an XML file that it needs, but when I press Run, it builds the app and
      puts it in the debug folder. Now I want the IDE to copy my XML file to that
      same folder...

      Greetz,
      -- Rob.

      Lee Falin wrote:[color=blue]
      > You need to make sure you add a custom action to the
      > deployment project that will include the XML file.
      >
      > -Lee
      >[color=green]
      >> -----Original Message-----
      >> Hello,
      >>
      >> I want an xml file, part of the project, be included in the build so
      >> that it gets to debug/bin.
      >> I already set the build action "content", which describes what I
      >> want, but vs.net doesn't deploy it.
      >>
      >> Anyone got an idea?
      >>
      >> Greetz,
      >> -- Rob.
      >>
      >>
      >> .[/color][/color]


      Comment

      • Michael Mayer

        #4
        Re: Include xml file in build output

        Similar to CopyLocal for Add Refernce - but for a content resource,
        right? I haven't seen it but am interested if anyone knows of a way
        to do it. It would be helpful when you expect a file to be in the
        same directory as your application (e.g. in final deployment) but not
        so easy when you have a structure. If there isn't a way to copy
        local, what other approaches have people done? I just make my own
        copies manually, but it's annoying when I change the original
        "fileIUse.x ml".

        ProjectDir
        fileIUse.xml (expected to be in app folder)
        Source
        source1.cs
        Bin
        Debug
        my.exe
        copyOfDll.dll
        Release
        my.exe
        copyOfDll.dll


        --
        Michael Mayer
        mrmayer@charter .net
        My CSharp page: http://www.mag37.com/csharp/


        "Rob Tillie" <Rob.Tillie@stu dent.tul.edu> wrote in message
        news:urI0$IcYDH A.1640@TK2MSFTN GP10.phx.gbl...[color=blue]
        > Hello,
        >
        > I don't mean when I'm deploying the app, but just in my Visual[/color]
        Studio IDE. I[color=blue]
        > have an XML file that it needs, but when I press Run, it builds the[/color]
        app and[color=blue]
        > puts it in the debug folder. Now I want the IDE to copy my XML file[/color]
        to that[color=blue]
        > same folder...
        >
        > Greetz,
        > -- Rob.
        >
        > Lee Falin wrote:[color=green]
        > > You need to make sure you add a custom action to the
        > > deployment project that will include the XML file.
        > >
        > > -Lee
        > >[color=darkred]
        > >> -----Original Message-----
        > >> Hello,
        > >>
        > >> I want an xml file, part of the project, be included in the build[/color][/color][/color]
        so[color=blue][color=green][color=darkred]
        > >> that it gets to debug/bin.
        > >> I already set the build action "content", which describes what I
        > >> want, but vs.net doesn't deploy it.
        > >>
        > >> Anyone got an idea?
        > >>
        > >> Greetz,
        > >> -- Rob.
        > >>[/color][/color][/color]


        Comment

        • Rob Tillie

          #5
          Re: Include xml file in build output

          Well, I found a workaround. I put the working folder to the project folder,
          so it will run the app from the debug folder, but take the files from the
          project folder.
          But i believe this is done automatically for web projects. I put a couple of
          html files in my project, and they are copied to the output directory. But
          for my console app, it just doesn't work. There must be a very simple
          solution for this I guess, just haven't found it yet.

          Greetz,
          -- Rob.

          Michael Mayer wrote:[color=blue]
          > Similar to CopyLocal for Add Refernce - but for a content resource,
          > right? I haven't seen it but am interested if anyone knows of a way
          > to do it. It would be helpful when you expect a file to be in the
          > same directory as your application (e.g. in final deployment) but not
          > so easy when you have a structure. If there isn't a way to copy
          > local, what other approaches have people done? I just make my own
          > copies manually, but it's annoying when I change the original
          > "fileIUse.x ml".
          >
          > ProjectDir
          > fileIUse.xml (expected to be in app folder)
          > Source
          > source1.cs
          > Bin
          > Debug
          > my.exe
          > copyOfDll.dll
          > Release
          > my.exe
          > copyOfDll.dll
          >
          >
          >
          > "Rob Tillie" <Rob.Tillie@stu dent.tul.edu> wrote in message
          > news:urI0$IcYDH A.1640@TK2MSFTN GP10.phx.gbl...[color=green]
          >> Hello,
          >>
          >> I don't mean when I'm deploying the app, but just in my Visual
          >> Studio IDE. I have an XML file that it needs, but when I press Run,
          >> it builds the app and puts it in the debug folder. Now I want the
          >> IDE to copy my XML file to that same folder...
          >>
          >> Greetz,
          >> -- Rob.
          >>
          >> Lee Falin wrote:[color=darkred]
          >>> You need to make sure you add a custom action to the
          >>> deployment project that will include the XML file.
          >>>
          >>> -Lee
          >>>
          >>>> -----Original Message-----
          >>>> Hello,
          >>>>
          >>>> I want an xml file, part of the project, be included in the build
          >>>> so that it gets to debug/bin.
          >>>> I already set the build action "content", which describes what I
          >>>> want, but vs.net doesn't deploy it.
          >>>>
          >>>> Anyone got an idea?
          >>>>
          >>>> Greetz,
          >>>> -- Rob.[/color][/color][/color]


          Comment

          Working...