this we publish the whole site, but what if i need external resources or exclude some config files?
so i looked around good people and here is what i found (also validated):
Adding to the Deployment
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
CustomCollectFiles;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
</PropertyGroup>
<Target Name="CustomCollectFiles">
<ItemGroup>
<_CustomFiles Include="D:\Dev\W2012TFS2012Prd\DefaultCollection\Test\MySites\MvcApplication\Properties\PublishProfiles\**\*" />
<FilesForPackagingFromProject Include="%(_CustomFiles.Identity)">
<DestinationRelativePath>Extra Files\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
Exclude From Deployment
<PropertyGroup>
<ExcludeFilesFromPackageDependsOn>
$(ExcludeFilesFromPackageDependsOn);
_ExcludeAzureDlls
</ExcludeFilesFromPackageDependsOn>
</PropertyGroup>
<Target
Name="_ExcludeAzureDlls">
<ItemGroup>
<AzureFiles
Include="@(FilesForPackagingFromProject)"
Exclude="@(FilesForPackagingFromProjectWithNoAzure)" />
<ExcludeFromPackageFiles
Include="@(AzureFiles)">
<FromTarget>_ExcludeAzureEnvironmentDlls</FromTarget>
</ExcludeFromPackageFiles>
</ItemGroup>
</Target>
taken from : http://pastebin.com/6BFehAG3
here is a MSDN FAQ about Web Deployment http://msdn.microsoft.com/en-us/library/ee942158.aspx it also helped abit
No comments:
Post a Comment