Handling Index Sitecore_Marketingdefinitions_Web Was Not Found Errors in Sitecore 9+

Since the release of Sitecore 9+ we're seeing a lot of people posting in forums cases where they see errors related to indexes not found. Correcting this Sitecore startup issue was simple to fix once I figured out what's going on, and it's nothing related to indexes at all!  

We first started seeing this issue after the first installation of Sitecore 9's initial release and then in later versions as well. Right as soon as I tried to load everything up the index not found errors popped up, so I immediately ran towards that thinking well, it's an index issue! After some checking about, and because this is a fresh installation, I contacted support. Their answer was that Sitecore was shutting down, but I wonder how is that related to the message we're seeing? Let's look at the logs.

3856 08:22:33 INFO  **************************************************
3856 08:22:33 WARN  Sitecore shutting down
3856 08:22:33 WARN  Shutdown message: Directory rename change notification for 'C:\inetpub\wwwroot\sc.site'.
Overwhelming Change Notification in sc.site
HostingEnvironment initiated shutdown
Directory rename change notification for 'C:\inetpub\wwwroot\sc.site'.
Overwhelming Change Notification in sc.site

Ok, the directory rename change message is peculiar.  In the article https://kb.sitecore.net/articles/669309, Sitecore states the issue is due to changes occurring in the App_data folder and there's a patch for Windows Server 2012 R2, but we're still seeing this on 2016. The 2nd recommendation in this article is to disable the Sitecore.Diagnostics.config file, but this goes against best practices of modifying out of the box files. Your changes will get lost in your next upgrade!

I've created a patch file for you to use that will disable the DumpConfigurationFiles processor on initialize, which is the part of the Sitecore.Diagnostics.config file causing the problem. Hopefully this gets resolved some time soon, but if you're smart this config will become part of your solution and after first deploy the matter should be resolved for you. Following the Helix pattern, I'm placing this config file in App_Config/Include/Project/, named Project.Website.DisableDumpConfigurationFilesProcessor.config.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
        <processor type="Sitecore.Pipelines.Loader.DumpConfigurationFiles, Sitecore.Kernel">

Once the config file was deployed, Sitecore obviously restarts, but everything's smooth after this!