How can I use the \"Precompile during publishing\" flag on a VS2013 x64 project? No matter what I do, it fails to publish because it insists on using the x86 ASPNETCOMPILER.
This seems to be a bug in Visual Studio 2013.
Microsoft Connect - Precompile error when using X64 platform
The workaround listed there works and is to add the following xml in the Project/PropertyGroup xml tag to the publish profile (located in the Properties\PublishProfiles directory of your project).
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
I was getting this build error before applying the above workaround: "Could not load file or assembly '****' or one of its dependencies. An attempt was made to load a program with an incorrect format." - ASPNETCOMPILER