We are trying to deploy a web service via MSbuild and then using MSDeploy to push the service to the IIS server. Based on the different environments we have separate config files that need to be referenced based on where they reside using . The problem is when the package is created the other web..config files don't get package. I've tried using
<CopyAllFilesToSingleFolderForPackageDependsOn>
CustomCollectFiles;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
Combined with
<Target Name="CustomCollectFiles">
<ItemGroup>
<FilesForPackagingFromProject Include="*.config">
<DestinationRelativePath>%(Filename)%(Extension)</DestinationRelativePath>
<FilesForPackagingFromProject>
</ItemGroup>
</Target>
But It doesn't seem to copy the files over. Am I doing something wrong or is my option to turn these in to Transform Files?
Stupid me, I never tried just renaming the files... as long as the config file doesn't start with Web MSBuild copies the file into the package and doesn't assume that its a transformation file