I am running aspnet_compiler as a post-build event, using the following command:
aspnet_compiler.exe -v / -p \
I am getting this error on compile:
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
I have read several other StackOverflows about this, and tried the following:
- Looked for stray web.config files -- there are none, except the two that come standard in an MVC app (in the main MVC directory and in the Views directory).
- Added the application in IIS. This didn't make a difference.
- Tried running with IIS Express instead of the development server -- no difference.
Any thoughts on what could be causing this?