Flex Builder 2 to Flex Builder 3 Gotcha

I suspect this has been commented on already, so apologies if you are already aware of this but I thought I’d post about it in case there are a few people out there who have yet to come across this. It revolves around the importation / opening of Flex Builder 2 projects within the beta of Flex Builder 3 (Moxie). By projects I’m mainly referring to MXML projects as I’ve not actually tested it on pure ActionScript 3.0 workspaces.

The specifics are as follow, if you open a FB2 project in FB3 you’ll probably get the following error message as that shown in the image here illustrates.Fb2 Fb3 Error Msg Now the message does seem to be pretty clear. However tracking it down can prove a bit of a chore if you’re not used to using eclipse or Flex Builder. I’m not sure if this is a temporary issue / bug that will be resolved once Moxie is released but keep in mind that you if it does appear in relation to a project you have just opened don’t panic. Normally with error messages you can just double click on them and they will open the offending file and highlight the issue that the error relates to. However as this is a compiler issue you get no such help. it’s pretty simple to resolve though, in fact it’s only a few clicks.

All you need to do is right click on the project itself and from the context menu select the project properties. Once the dialog box opens click on the Flex Build Path entry on the left hand side. Moxie BuildpathOnce the right hand pane displays the build path information you’ll see two tabs at the top, one labeled Source path and the other labeled Library path. Select the Library path tab from here you will see the path that the error message relates to (it’s the one highlighted in grey in the image above). You have pretty much one option here and that is to remove the entry from the list. Hold on one second though before you do. If you remove this entry you will get an additional pop up dialog that will inform you that your project now needs to be upgraded to a Flex Builder 3 project and will no longer be compatible with Flex Builder 2. If you’re cool with that then go ahead and click the OK button.

That’s it once you close the dialog, and if you have automatic build enabled, you’ll see the message disappear after a few seconds.

Just as a quick side note. The process is pretty much the same for Flex Library projects too except you need to access the Flex Library Build Path entry and there are more tabs, but the same tab applies so it’s a bit of a no brainer.

Mike Jones