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. XML / XSL
  4. .vcproj XML transformations

.vcproj XML transformations

Scheduled Pinned Locked Moved XML / XSL
csharpc++xmljsonquestion
5 Posts 2 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.
  • C Offline
    C Offline
    CodeTortoise
    wrote on last edited by
    #1

    Hi, I'm looking to convert my visual studio (version 8) .vcproj file ( xml v1.0 ), in a way that I can exclude .cpp files from the build and add .cpp files to the build. As I understand it XSLT should be a neat way of doing this, but being an XML newbie I wanted to ask some basic questions first. - 1) Any good code C# / C++ or whatever projects or whatever of parsing the .VCPROJ XML format? - 2) Alternatively can XSLT do this easily? - 3) Can I get XSLT to spit out what it finds without me having to describe the format of the .vcproj file? You see I don't really care about it's format, I just know I want certain .cpp files excluded from building, and some .cpp files added and have the rest of the file be replicated as it was. - 4) If 3) can work, is it easy enough to have the XSLT have an exclusion list, i.e. .cpp files I want to leave alone. - 5) What is the best way of doing this if not using XSLT? NB. this is for automating a 'unity build' which removes .cpp files form the build in favour of master .cpp files that actually #include the .cpp files! Thanks in advance, Tortoise.

    C L 2 Replies Last reply
    0
    • C CodeTortoise

      Hi, I'm looking to convert my visual studio (version 8) .vcproj file ( xml v1.0 ), in a way that I can exclude .cpp files from the build and add .cpp files to the build. As I understand it XSLT should be a neat way of doing this, but being an XML newbie I wanted to ask some basic questions first. - 1) Any good code C# / C++ or whatever projects or whatever of parsing the .VCPROJ XML format? - 2) Alternatively can XSLT do this easily? - 3) Can I get XSLT to spit out what it finds without me having to describe the format of the .vcproj file? You see I don't really care about it's format, I just know I want certain .cpp files excluded from building, and some .cpp files added and have the rest of the file be replicated as it was. - 4) If 3) can work, is it easy enough to have the XSLT have an exclusion list, i.e. .cpp files I want to leave alone. - 5) What is the best way of doing this if not using XSLT? NB. this is for automating a 'unity build' which removes .cpp files form the build in favour of master .cpp files that actually #include the .cpp files! Thanks in advance, Tortoise.

      C Offline
      C Offline
      CodeTortoise
      wrote on last edited by
      #2

      writing it as we speak in C#, chosen NOT to use XSLT since I need to spit out the '#include file.cpp' to a .cpp, as well as write a new .vcProj... but maybe there is a way with xslt transformations.

      1 Reply Last reply
      0
      • C CodeTortoise

        Hi, I'm looking to convert my visual studio (version 8) .vcproj file ( xml v1.0 ), in a way that I can exclude .cpp files from the build and add .cpp files to the build. As I understand it XSLT should be a neat way of doing this, but being an XML newbie I wanted to ask some basic questions first. - 1) Any good code C# / C++ or whatever projects or whatever of parsing the .VCPROJ XML format? - 2) Alternatively can XSLT do this easily? - 3) Can I get XSLT to spit out what it finds without me having to describe the format of the .vcproj file? You see I don't really care about it's format, I just know I want certain .cpp files excluded from building, and some .cpp files added and have the rest of the file be replicated as it was. - 4) If 3) can work, is it easy enough to have the XSLT have an exclusion list, i.e. .cpp files I want to leave alone. - 5) What is the best way of doing this if not using XSLT? NB. this is for automating a 'unity build' which removes .cpp files form the build in favour of master .cpp files that actually #include the .cpp files! Thanks in advance, Tortoise.

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        CodeTortoise wrote:

        NB. this is for automating a 'unity build'

        What is a Unity Build[^] ?

        led mike

        C 1 Reply Last reply
        0
        • L led mike

          CodeTortoise wrote:

          NB. this is for automating a 'unity build'

          What is a Unity Build[^] ?

          led mike

          C Offline
          C Offline
          CodeTortoise
          wrote on last edited by
          #4

          Unity build.. 1) In visual studio exclude all you .cpp from the build. 2) #include all your .cpp files into a new .cpp file and add this .cpp to the build. 3) Compile, link ( note the speed difference ).

          L 1 Reply Last reply
          0
          • C CodeTortoise

            Unity build.. 1) In visual studio exclude all you .cpp from the build. 2) #include all your .cpp files into a new .cpp file and add this .cpp to the build. 3) Compile, link ( note the speed difference ).

            L Offline
            L Offline
            led mike
            wrote on last edited by
            #5

            Thanks I now found a reference to it on this blog[^] (another blog using a horrible font X| what's up with that? )

            CodeTortoise wrote:

            since I need to spit out the '#include file.cpp' to a .cpp, as well as write a new .vcProj

            I don't believe it will do that but you could just have two XSLT's, one for each output file and run them both. The answer to all the rest of your can XSLT do this and that is yes. You can create just about any Text output using XSLT. That said, since UB is a development activity rather than a production build activity writing your C# utility to do this seems a perfectly fine choice.

            led mike

            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