Where in the code does the platform switch occur, ie. Assigning WindowsApplication to GenericApplication?