On Windows 8 and up, MS's Windows Defender replaces Microsoft Security Essentials as the virus and threat protection software included with Windows.

Windows Defender has a feature called "Controlled folder access" that protects files and folders from authorized changes. Enabling that feature causes problems trying to create Web sites with ASNA Visual RPG and Visual Studio. The error usually manifests itself with the error dialog shown below in Figure 1. but other symptoms may be displayed, usually saying something about being unable to write to the drive.

Figure 1. Error creating Websites caused by Windows Defender

We recreated this issue with both Visual Studio 2015 and Visual Studio 2017 but it would probably occur with other versions as well). To resolve this issue you need to configure Windows Defender to allow Visual Studio to make folder and file changes.

To make this change:

Step 1. Launch the Windows Security settings (press the "Windows" key and search for "Windows Security").

Figure 2a. The Windows Security settings panel

Step 2. Scroll down and select "Virus & threat protection settings."

Figure 2b. Select virus settings

Step 3. Scroll down and select "Manage Controlled folder access."

Figure 2c. Manage Controlled folder access

Step 4. Scroll down and look at Controlled Folder Access. Make sure it is switched on and click "Allow an app through Controlled folder access."

Figure 2d. Enable an app to allow folder and file changes

The Visual Studio executable is devenv.exe and this is the app you need to select to allow file and folder changes.

devenv.exe is found in the following folder for Visual Studio 2017:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\

devenv.exe is found at the following folder for Visual Studio 2015:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\

Confusingly, Visual Studio 2017 is Visual Studio version 15.x and Visual Studio 2015 is Visual Studio version 14.x.

If you have trouble locating your copy of devenv.exe:

  • Open a Windows command prompt

  • Change to the C:\Program Files (x86) folder

  • Use this command to search for devenv.exe:

    dir devenv.exe /s

Please login or create an account to post comments.