views:

222

answers:

1

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

+1  A: 

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.

Christian Nunciato
Thanks. This may work for simple projects but ours has dependencies so this fails to build. I guess I could play around with compiler options like compiler.library-path but then I need to keep the project file in sync with the build script.
Kent Boogaart
It's definitely worth exploring, yeah. I simplified my command line for purposes of illustration, but we build pretty much exactly this way, with mxmlc, the SDK and a flex-config.xml file, and all goes well -- localization, modules, etc., all get handled with a single batch file. Good luck!
Christian Nunciato
As I feared, I was able to get this building but there are already discrepancies between my output and that of FB3. I don't like the idea of manually keeping the build script in sync with the project file(s), so I think we'll be checking in the Flex binaries until I can figure out a better solution. It may be that I either replicate the Ant tasks as MSBuild tasks, or I shell out to Ant.
Kent Boogaart