Remove the obj folder before build to avoid "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level." errors. Read more: http://kitsula.com/Article/How-to-remove-bin-obj-folder-before-build-deploy.