Skip to content

Commit 4125742

Browse files
committed
Setting Startup\* as Copy always
1 parent 3d5b091 commit 4125742

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

AzureWebFarm.OctopusDeploy/Tools/install.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,12 @@ $xdt = Get-Content (Join-Path $toolsPath "CloudProject.ccproj.xdt.xml")
5454
$assemblyName = ($project.Properties | Where-Object { $_.Name -eq "AssemblyName" } | Select-Object -First 1).Value
5555
$xdt.Replace("%WebProjectName%", $project.Name).Replace("%WebProjectDir%", $projectPath).Replace("%WebAssemblyName%", $assemblyName) | Set-Content $tempFile
5656
XmlTransform $ccProj.FullName $tempFile
57+
58+
$startupFolder = $project.ProjectItems |
59+
Where-Object { $_.Name -eq "Startup" } |
60+
Select-Object -First 1
61+
$startupFolder.ProjectItems |
62+
ForEach-Object {
63+
Write-Host "Setting Startup\$($_.Name) as Copy always"
64+
$_.Properties.Item("CopyToOutputDirectory").Value = [int]1
65+
}

0 commit comments

Comments
 (0)