Visual Studio 2010 web deployment projects do not remote the App_Data folder

Having come accross the problem before that Visual Studio 2010 web deployment projects do not remote the App_Data folder even though you have checked the box to do exactly that I have today found myself trying to find what the resolution was again so thought I would blog about it partially for your benefit but also for my own sanity should I need this information again.

Open the file
C:\Program Files (x86)\MSBuild\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets

Locate the following section and add in the missing red backslash

        <!--
        Removing APP_DATA is done here so that the output groups reflect the fact that App_data is
        not present
        -->
        <RemoveDir Condition="'$(DeleteAppDataFolder)' == 'true'" Directories="$(TempBuildDir)\App_Data"/>
        <CreateItem Include="$(TempBuildDir)\**\*.*"  Condition="'$(UseMerge)' != 'true'">
            <Output ItemName="PrecompiledOutput" TaskParameter="Include" />
        </CreateItem>

Comments

Popular posts from this blog

SOLVED: Exchange Online Management PowerShell Connect-ExchangeOnline bug "A window handle must be configured. See https://aka.ms/msal-net-wam#parent-window-handles"

System error 86 has occurred. The specified network password is not correct.

The security identifier of the "NT SERVICE\WdiServiceHost" account is "S-1-5-80-3139157870-2983391045-3678747466-658725712-1809340420"