I thought this was going to be a simple thing to fix, but after trying several solutions I found on Google (clearing temp for the system, running build through 64-bit IIS Express, and building in release mode instead of debug), I'm still getting the following error:
The command that is being run:
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\aspnet_merge.exe C:\Users\jmckinnon\AppData\Local\Temp\WebSitePublish\cv_net_2008--650083730\obj\Debug\AspnetCompileMerge\TempBuildDir -o xxxxx -copyattrs C:\Users\jmckinnon\AppData\Local\Temp\WebSitePublish\cv_net_2008--650083730\obj\Debug\AssemblyInfo\AssemblyInfo.dll -a -debug
I'm getting this error by running a publish to a zip with the following precompile settings:
A few things to note:
- The WebSite is NOT a WebApplication!
- The site has over 9100 files
- Running .Net 4.5
- Trying to build on a Windows 7 Professional 64 bit machine with 16GB of RAM
- Only reason I'm trying to build into a single DLL is because I need to version the output of the package. I found out I can version the App_Code using an AssemblyInfo.vb file but the only way I can version all of the other DLLs (default no merging publish generates a DLL for each page) is to add a version directive in each page which is too much to maintain with over 1000 pages.
aspnet_merge is a 32-bit process and seems to crash when it gets to close to 2GB memory usage, which happened to our project. We fixed that by making aspnet_merge.exe large address aware using editbin.exe (included with VS2015, but not with VS2017 it seems...).
editbin /LARGEADDRESSAWARE "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\aspnet_merge.exe"