.vcproj XML transformations
-
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.
-
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.
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.
-
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.
-
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 ).
-
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 ).
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