Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. <PropertyGroup>
  2. <CopyAllFilesToSingleFolderForPackageDependsOn>
  3. CustomCollectFiles;
  4. $(CopyAllFilesToSingleFolderForPackageDependsOn);
  5. </CopyAllFilesToSingleFolderForPackageDependsOn>
  6. </PropertyGroup>
  7. <Target Name="CustomCollectFiles">
  8. <!-- Copy license dependencies -->
  9. <ItemGroup>
  10. <LicDependencies Include="....Dependencies***.lic" />
  11. <FilesForPackagingFromProject Include="@(LicDependencies)">
  12. <DestinationRelativePath>bin%(Filename)%(Extension)</DestinationRelativePath>
  13. </FilesForPackagingFromProject>
  14. </ItemGroup>
  15. <!-- Copy dictionary dependencies -->
  16. <ItemGroup>
  17. <DicDependencies Include="....Dependencies***.dic" />
  18. <FilesForPackagingFromProject Include="@(DicDependencies)">
  19. <DestinationRelativePath>bin%(Filename)%(Extension)</DestinationRelativePath>
  20. </FilesForPackagingFromProject>
  21. </ItemGroup>
  22. </Target>
  23.  
  24. /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:MSDeployServiceURL=XXX.XXX.XXX.XXX /p:DeployIISAppPath="SITE_HERE" /p:Configuration="Release" /p:CreatePackageOnPublish=True /p:MsDeployPublishMethod=WMSVC /p:AllowUntrustedCertificate=True /p:UserName=USERNAME /p:Password=PASSWORD /p:SkipExtraFilesOnServer=True
  25.  
  26. <PropertyGroup>
  27. <PreBuildEvent>
  28. IF NOT EXIST "$(ProjectDir)bin" MKDIR "$(ProjectDir)bin"
  29. for /R "$(ProjectDir)....Dep" %25%25f in (*.dic, *.lic) do copy /Y "%25%25f" "$(ProjectDir)bin%25%25~nxf"</PreBuildEvent>
  30. </PropertyGroup>
  31.  
  32. <Target Name="BeforeBuild">
  33. <ItemGroup>
  34. <!-- License file dependencies -->
  35. <Licenses Include="$(ProjectDir)....Dep***.lic"/>
  36. <!-- Dictionary file dependencies -->
  37. <Dictionaries Include="$(ProjectDir)....Dep***.dic"/>
  38. </ItemGroup>
  39. <!-- Copy the licenses and dictionary dependency files -->
  40. <Copy SourceFiles="@(Licenses)" DestinationFiles="@(Licenses->'bin%(Filename)%(Extension)')" />
  41. <Copy SourceFiles="@(Dictionaries)" DestinationFiles="@(Dictionaries->'bin%(Filename)%(Extension)')" />
  42. <ItemGroup>
  43. <!-- Mark the license and dictionary files to be included in the publish -->
  44. <Content Include="bin*.dic" />
  45. <Content Include="bin*.lic" />
  46. </ItemGroup>
  47. </Target>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement