J
Jim Chaney
(Apologies for the length of the upcoming; long code snippets are a pain I
know)
I am trying to use MSBuild to drive the conversion of a collection of
Collada files (.dae filetype, ie. meshes exported from Max/Maya). I have
successfully written a Project configuration that processes a .dae files
(using a custom task to run an Xsl transform over the xml file and extract
dependant files such as textures) but I am having trouble processing
multiple files in parallel.
I thought I could create a task like the one below, that would read the
contents of a .geomset file (just filenames, one per line) and run MSBuild
against each filename found. It does indeed run, but it doesn't spawn
multiple copies of msbuild to do it.
Shouldn't it see the MSBuild tag and run each geom file in a seperate core?
I am running with /m (and /m:8 to be sure of using all cores) and it seems
to not care a jot.
What am I doing wrong?
Thanks in advance,
Jim Chaney
-------------------- Code snippets
(Tasks not in mail;
Build: Sets up the GeomSetOutputFolder variable, uses the commandline
Property parameter to set the geomset filename
ParseGeomSet: Reads a file, creates new item from content of each line,
fills the GeomFiles collection
DoAO: Does all the interesting work
)
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="3.5">
....
<Target Name="ProcessGeomSet" DependsOnTargets="ParseGeomSet">
<MSBuild
Projects="GeoBuild.proj"
Targets="ProcessSingleGeom"
ToolsVersion="3.5"
BuildInParallel="true"
Properties="InputGeomFile=%(GeomFiles.Identity);GeomSetOutputFolder=$(GeomSetOutputFolder)"
/>
</Target>
<Target Name="CreateSingleGeomTarget">
<CreateItem Include="$(InputGeomFile)">
<Output TaskParameter="Include" ItemName="GeomFiles" />
</CreateItem>
<MakeDir Directories="$(GeomSetOutputFolder)%(GeomFiles.Filename)" />
</Target>
<Target Name="ProcessSingleGeom"
DependsOnTargets="CreateSingleGeomTarget;DoAO">
</Target>
know)
I am trying to use MSBuild to drive the conversion of a collection of
Collada files (.dae filetype, ie. meshes exported from Max/Maya). I have
successfully written a Project configuration that processes a .dae files
(using a custom task to run an Xsl transform over the xml file and extract
dependant files such as textures) but I am having trouble processing
multiple files in parallel.
I thought I could create a task like the one below, that would read the
contents of a .geomset file (just filenames, one per line) and run MSBuild
against each filename found. It does indeed run, but it doesn't spawn
multiple copies of msbuild to do it.
Shouldn't it see the MSBuild tag and run each geom file in a seperate core?
I am running with /m (and /m:8 to be sure of using all cores) and it seems
to not care a jot.
What am I doing wrong?
Thanks in advance,
Jim Chaney
-------------------- Code snippets
(Tasks not in mail;
Build: Sets up the GeomSetOutputFolder variable, uses the commandline
Property parameter to set the geomset filename
ParseGeomSet: Reads a file, creates new item from content of each line,
fills the GeomFiles collection
DoAO: Does all the interesting work
)
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="3.5">
....
<Target Name="ProcessGeomSet" DependsOnTargets="ParseGeomSet">
<MSBuild
Projects="GeoBuild.proj"
Targets="ProcessSingleGeom"
ToolsVersion="3.5"
BuildInParallel="true"
Properties="InputGeomFile=%(GeomFiles.Identity);GeomSetOutputFolder=$(GeomSetOutputFolder)"
/>
</Target>
<Target Name="CreateSingleGeomTarget">
<CreateItem Include="$(InputGeomFile)">
<Output TaskParameter="Include" ItemName="GeomFiles" />
</CreateItem>
<MakeDir Directories="$(GeomSetOutputFolder)%(GeomFiles.Filename)" />
</Target>
<Target Name="ProcessSingleGeom"
DependsOnTargets="CreateSingleGeomTarget;DoAO">
</Target>