For anyone else stumbling upon this you can add the below parameter to your publish profile and it will fix the issue:
<AspnetCompileMergeIntermediateOutputPath><short path></AspnetCompileMergeIntermediateOutputPath>
ex:
<AspnetCompileMergeIntermediateOutputPath>c:\compile\</AspnetCompileMergeIntermediateOutputPath>