The chip in the key and the transponder box have to match and and they also have to be coded to the ECU.
So if you just swap the ECU then the car won't run but you can code your exsisting transponder and key to the new ECU with VAG-com
If you have the whole car then its easier to swap the whole lot.....