Skip to content

Commit 421d552

Browse files
committed
Fixing Clean build target.
1 parent 8e9d587 commit 421d552

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

build.proj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,18 @@
124124
<UsingTask Condition=" $(OnPremiseBuild) " TaskName="CorporateValidation" AssemblyFile="$(CIToolsPath)\Microsoft.WindowsAzure.Tools.Build.Tasks.OnPremise.dll" />
125125
<Import Condition=" $(OnPremiseBuild) " Project="$(CIToolsPath)\Microsoft.WindowsAzure.Build.OnPremise.msbuild" />
126126

127-
<UsingTask
128-
AssemblyFile="$(MSBuildProjectDirectory)\packages\xunit.runner.msbuild.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.runner.msbuild.dll"
129-
TaskName="Xunit.Runner.MSBuild.xunit" />
127+
<UsingTask AssemblyFile="$(MSBuildProjectDirectory)\packages\xunit.runner.msbuild.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" />
130128

131129
<!-- Clean the build in all configurations -->
132130
<Target Name="Clean">
133131
<Message Importance="high" Text="Cleaning Cmdlets..." />
134132

135133
<!-- Clean out the NuGet cache -->
136-
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;$Path = Join-Path $env:USERPROFILE .nuget; if (Test-Path $Path) { Remove-Item $Path -Recurse -Force }&quot;" />
134+
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Remove-Item -Path (Join-Path ($env:USERPROFILE) .nuget packages) -Recurse -Force&quot;" ContinueOnError="WarnAndContinue" />
137135

138136
<!-- Remove Package, Publish, bin, obj, and TestResults directories -->
139-
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Remove-Item -Path $(PackageDirectory),$(PublishDirectory) -Recurse -Force&quot;" />
140-
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Get-ChildItem -Path $(MSBuildThisFileDirectory) -Recurse -Include 'bin','obj','TestResults' | Remove-Item -Recurse -Force&quot;" />
137+
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Remove-Item -Path $(PackageDirectory),$(PublishDirectory) -Recurse -Force&quot;" ContinueOnError="WarnAndContinue" />
138+
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Get-ChildItem -Path $(MSBuildThisFileDirectory) -Recurse -Include 'bin','obj','TestResults' | Remove-Item -Recurse -Force&quot;" ContinueOnError="WarnAndContinue" />
141139
</Target>
142140

143141
<PropertyGroup>

0 commit comments

Comments
 (0)