Skip to content

Instantly share code, notes, and snippets.

@sdurandeu
Last active June 13, 2022 13:55
Show Gist options
  • Save sdurandeu/80b286cd0c3971576d39 to your computer and use it in GitHub Desktop.
Save sdurandeu/80b286cd0c3971576d39 to your computer and use it in GitHub Desktop.
MsBuild: Add custom files in web deploy package
<Target Name="AdditionalFilesForPackage" AfterTargets="CopyAllFilesToSingleFolderForPackage;CopyAllFilesToSingleFolderForMsDeploy">
<ItemGroup>
<AppDataFiles Include="$(MSBuildProjectDirectory)\App_Data\**\*" />
</ItemGroup>
<Copy SourceFiles="@(AppDataFiles)" DestinationFiles="@(AppDataFiles->'$(_PackageTempDir)\App_Data\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment