I fire up aspnet_compiler as a post-build event using the following command:
aspnet_compiler.exe -v / -p \
I get this error while compiling:
An error occurred while using a section registered as allowDefinition = 'MachineToApplication' that is higher than the application level. This error can be caused by the fact that the virtual directory is not configured as an application in IIS.
I read several other StackOverflow about this and tried the following:
- I looked at the roaming web.config files - there are none, except for two, that are included in the standard MVC application (in the main MVC directory and in the views directory).
- Added application in IIS. It didn’t matter.
- I tried to work with IIS Express instead of the development server - no difference.
Any thoughts on what could be causing this?
source share