R – Building Flex 3 Project from MSBuild

apache-flexbuild-processflex3msbuild

I am working on a .NET project with a Flex/Flash front end. The build scripts are written in MSBuild and I'm looking to build the Flex project (authored in Flex Builder 3) from my primary build script.

What options do I have for building a Flex 3 application from MSBuild?

I've already seen flexbuild, and it looked ideal until I tried it. I get the same error as reported by others and the project looks kind of . . . dead.

Note that I really want to minimize the complexity of my build. If possible, I don't want to have to shell out to Ant.

EDIT: having downloaded and examined the source of flexbuild, I see that it is looking for Eclipse projects that do not exist. I guess there is a difference between the project files of Flex Builder 3 and Eclipse. I need to get this working with FB3 though – Eclipse isn't an option.

Thanks

Best Answer

I find using a simple batch file works just fine.

Here, where %FLEXSDK% contains the path to the SDK you're using, %DEBUG% "true" or "false", and %OUTPUT_PATH% the destination path and filename:

"%FLEXSDK%\bin\mxmlc" -debug=%DEBUG% -output=%OUTPUT_PATH% src\MyMain.mxml

Simple and straightforward! Hope it helps.