MSBuild Tasks Integration

Aug 30, 2010 at 4:07 PM


I just downloaded the source files and saw the MSBuild project for PreBuild and PostBuild Tasks.

So I really don't know how and where to put the target configuration. Basically, we put the import in the main csproj and add something like this:

<Import Project="$(MSBuildExtensionsPath)\Refix\v0.8\RefixMSBuild.targets" />
  <Target Name="BeforeBuild">
    <Message Text="Refix prebuild" />
    <PrebuildTask SolutionFile="$(SolutionPath)" Verbosity="Verbose" />
  <Target Name="AfterBuild">
    <Message Text="Refix postbuild" />
    <PostbuildTask SolutionFile="$(SolutionPath)" Verbosity="Verbose" />

But, there is a better solution to call these tasks before everything? Because Refix will take in input a solution and after compile all the projects. With my configuration, many projects are builded before the main one that contains configuration.




Aug 30, 2010 at 5:02 PM


Sorry, I just figured out, how to work with the Refix tasks.

1- First, we need to add the 2 existing projects in our solution:



2- Then, open the solution property dialog / Common Properties / Project Dependencies, and set the postbuild project dependant of all projects except prebuild and for each project set a dependency to the prebuild project.


Sep 7, 2010 at 5:32 PM

We need to work on the documentation a bit. There is a "solution" or "sln" command which adds the projects to your solution, and adds the project dependencies in the way you describe. You don't need to do it manually.