Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <PropertyGroup>
- <CopyAllFilesToSingleFolderForPackageDependsOn>
- CustomCollectFiles;
- $(CopyAllFilesToSingleFolderForPackageDependsOn);
- </CopyAllFilesToSingleFolderForPackageDependsOn>
- </PropertyGroup>
- <Target Name="CustomCollectFiles">
- <!-- Copy license dependencies -->
- <ItemGroup>
- <LicDependencies Include="....Dependencies***.lic" />
- <FilesForPackagingFromProject Include="@(LicDependencies)">
- <DestinationRelativePath>bin%(Filename)%(Extension)</DestinationRelativePath>
- </FilesForPackagingFromProject>
- </ItemGroup>
- <!-- Copy dictionary dependencies -->
- <ItemGroup>
- <DicDependencies Include="....Dependencies***.dic" />
- <FilesForPackagingFromProject Include="@(DicDependencies)">
- <DestinationRelativePath>bin%(Filename)%(Extension)</DestinationRelativePath>
- </FilesForPackagingFromProject>
- </ItemGroup>
- </Target>
- /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
- <PropertyGroup>
- <PreBuildEvent>
- IF NOT EXIST "$(ProjectDir)bin" MKDIR "$(ProjectDir)bin"
- for /R "$(ProjectDir)....Dep" %25%25f in (*.dic, *.lic) do copy /Y "%25%25f" "$(ProjectDir)bin%25%25~nxf"</PreBuildEvent>
- </PropertyGroup>
- <Target Name="BeforeBuild">
- <ItemGroup>
- <!-- License file dependencies -->
- <Licenses Include="$(ProjectDir)....Dep***.lic"/>
- <!-- Dictionary file dependencies -->
- <Dictionaries Include="$(ProjectDir)....Dep***.dic"/>
- </ItemGroup>
- <!-- Copy the licenses and dictionary dependency files -->
- <Copy SourceFiles="@(Licenses)" DestinationFiles="@(Licenses->'bin%(Filename)%(Extension)')" />
- <Copy SourceFiles="@(Dictionaries)" DestinationFiles="@(Dictionaries->'bin%(Filename)%(Extension)')" />
- <ItemGroup>
- <!-- Mark the license and dictionary files to be included in the publish -->
- <Content Include="bin*.dic" />
- <Content Include="bin*.lic" />
- </ItemGroup>
- </Target>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement