Reputation: 5903
The only way I see now is to create xml file for MSBuild containing needed tasks invocations and then run MSBuild directly by calling "Execute Program" action. Is there any standard way of doing this using FinalBuilder?
Upvotes: 1
Views: 1641
Reputation: 603
You cannot just run an msbuild task from within another application without instantiating the msbuild environment on which it depends. You will need an msbuild project file at the very least.
Upvotes: 0
Reputation: 20561
In FinalBuilder 6 you can use a MSBuild Task. However to be honest in our build script I found that using a batch file and the 'Execute Program' to be a better solution.
Edit: Quickly doing some reading on this topic I now remember why I used a batch file. The FB6 MSBuild action is a little counterintuitive as not all the properties are accessible from the 'default view' and you need to change to the 'property grid'.
Update: From your comment; if you want to run an individual MSBuild task and not use the 'Execute Program' action then you will need to create your own FB action. I have never created an custom action myself but apparently they are really simple.
This is the batch file that I used:
@ECHO off
SET Action=%1
SET Configuration=%2
SET Platform=x86
SET CommonTools=%VS90COMNTOOLS%
SET SourceDir=%CD%\..\..
SET SolutionFilename=Solution.sln
SET MSBuild=C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe
IF "%Action%" == "" SET Action=Rebuild
IF "%Configuration%" == "" SET Configuration=Release
:BUILD
%MSBuild% "%SourceDir%\%SolutionFilename%" /v:m /t:%Action% /p:Configuration=%Configuration% /p:DenEnvDir="%CommonTools%..\IDE\" /p:SolutionDir="%SourceDir%" /p:Platform=%Platform%
:END
ECHO.
ECHO ErrorLevel: %ERRORLEVEL%
EXIT /B %ERRORLEVEL%
Upvotes: 2