Installed a brand new DNN 5.0.1 installation.
Upgraded web.config to 3.5 Framework version.
Added my own modules.
Tried to precompilte....
But sadly things went wrong... 'ScriptServiceAttribute' is ambiguous
Spent a long time looking inside web.config for the problem.... couldn't see it.
Eventually discovered that something (not sure what - was it in DNN?) had installed an old version of system.web.extensions.dll into my bin directory....
(at least next time I'll check there first)