Reputation: 2464
I want to create one MSBuild that will execute two others..
How can i import the two others and run each of their targets in order?
UPDATE:
I was able to get this working with the following.
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/MsBuild/2003">
<Target Name="BuildAll">
<Exec Command="C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe MSBuildSettings.xml" />
<Exec Command="C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe PostBuild.xml" />
</Target>
</Project>
Upvotes: 0
Views: 96
Reputation: 18082
Normally this would be done using the MSBuild task and dependencies:
<?xml version="1.0" encoding="utf-8" ?>
<Project DefaultTargets="PostBuild">
<Target Name="MainBuild">
<MSBuild Projects="MSBuildSettings.xml" />
</Target>
<Target Name="PostBuild" DependsOnTargets="MainBuild">
<MSBuild Projects="PostBuild.xml" />
</Target>
</Project>
Upvotes: 1
Reputation: 2622
why not just write a batch file that executes two msbuild commands?
Upvotes: 1
Reputation:
Process.Start("yourFirstExecutable.exe");
Process.Start("yourSecondExecutable.exe");
Is that what you are looking for?? Process.Start()
runs an external executable.
Upvotes: 0