@@ -77,11 +77,13 @@ task Compile -depends Clean, Init -description "This task compiles the solution"
77
77
- fileVersion $version `
78
78
- file $common_assembly_info
79
79
80
- & dotnet msbuild $solutionFile / t:Build `
81
- / p:Configuration= $configuration `
82
- / p:InformationalVersion= $pv `
83
- / p:Company= $company_name `
84
- / p:Copyright= $copyright
80
+ Exec {
81
+ & dotnet msbuild $solutionFile / t:Build `
82
+ / p:Configuration= $configuration `
83
+ / p:InformationalVersion= $pv `
84
+ / p:Company= $company_name `
85
+ / p:Copyright= $copyright
86
+ }
85
87
} finally {
86
88
Restore-File $common_assembly_info
87
89
}
@@ -105,7 +107,9 @@ task Pack -depends Compile -description "This task creates the NuGet packages" {
105
107
106
108
foreach ($package in $packages ) {
107
109
Write-Host " Creating NuGet package for $package ..." - ForegroundColor Magenta
108
- & dotnet pack $package -- output $nuget_package_directory -- configuration $configuration -- no- build -- version- suffix $packageVersion
110
+ Exec {
111
+ & dotnet pack $package -- output $nuget_package_directory -- configuration $configuration -- no- build -- version- suffix $packageVersion
112
+ }
109
113
}
110
114
} finally {
111
115
Restore-File $versionFile
@@ -121,7 +125,9 @@ task Test -depends Pack -description "This task runs the tests" {
121
125
foreach ($framework in $frameworks ) {
122
126
Write-Host " Running tests for framework: $framework " - ForegroundColor Green
123
127
124
- & dotnet test $testProject -- configuration $configuration -- framework $framework.Trim () -- no- build
128
+ Exec {
129
+ & dotnet test $testProject -- configuration $configuration -- framework $framework.Trim () -- no- build
130
+ }
125
131
}
126
132
}
127
133
0 commit comments