MSBuild Tasks Integration

Aug 30, 2010 at 4:07 PM

Hello,

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>
  <Target Name="AfterBuild">
    <Message Text="Refix postbuild" />
    <PostbuildTask SolutionFile="$(SolutionPath)" Verbosity="Verbose" />
  </Target>

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.

Thanks

 

Regards

Aug 30, 2010 at 5:02 PM

Hello,

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:

     refix.2008.Prebuild.csproj

     refix.2008.Postbuild.csproj

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.

Regards

Coordinator
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.