@@ -244,7 +244,7 @@ function Invoke-CoverTests($SearchPath = $RootPath, $SearchFilter = "*.csproj",
244244 Write-Step " Starting cover tests from $SearchPath with filter $FilterFile ."
245245
246246 if (-not (Test-Path $SearchPath )) {
247- Write-Host " $SearchPath does not exists, ignoring!" ;
247+ Write-Host - Warning " $SearchPath does not exists, ignoring!" ;
248248 return ;
249249 }
250250
@@ -336,7 +336,7 @@ function Invoke-CoverTests($SearchPath = $RootPath, $SearchFilter = "*.csproj",
336336 $errorText = " FAILED_TESTS ($exitCode )" ;
337337 }
338338
339- Write-Host " Nunit exited with $errorText for $projectName " ;
339+ Write-Host - Error " Nunit exited with $errorText for $projectName " ;
340340 Invoke-ExitCodeCheck $exitCode ;
341341 }
342342 }
@@ -409,13 +409,16 @@ function Invoke-DocFx($Metadata = [System.IO.Path]::Combine($DocumentationDir, "
409409 CopyAndReplaceFolder $docFxDest " $DocumentationArtifcacts \DocFx" ;
410410}
411411
412- function Invoke-PackSdkProject ($ProjectPath , [bool ]$IsTool = $False , [bool ]$IncludeSymbols = $False ) {
412+ function Invoke-PackSdkProject ($CsprojFile , [bool ]$IncludeSymbols = $False ) {
413+ Write-Host " Try to pack .NET SDK project: $ ( $CsprojFile.Name ) ..." ;
414+
413415 # Check if the project should be packed
414- $csprojFullName = $csprojFile .FullName ;
416+ $csprojFullName = $CsprojFile .FullName ;
415417 [xml ]$csprojContent = Get-Content $csprojFullName
416418 $createPackage = $csprojContent.Project.PropertyGroup.CreatePackage ;
417419;
418420 if ($null -eq $createPackage -or " false" -eq $createPackage ) {
421+ Write-Host - Warning " ... csproj not flagged with <CreatePackage>true</CreatePackage>: $ ( $CsprojFile.Name ) " ;
419422 return ;
420423 }
421424
@@ -433,11 +436,13 @@ function Invoke-PackSdkProject($ProjectPath, [bool]$IsTool = $False, [bool]$Incl
433436 Invoke-ExitCodeCheck $LastExitCode ;
434437}
435438
436- function Invoke-PackFrameworkProject ($ProjectPath , [bool ]$IsTool = $False , [bool ]$IncludeSymbols = $False ) {
439+ function Invoke-PackFrameworkProject ($CsprojFile , [bool ]$IsTool = $False , [bool ]$IncludeSymbols = $False ) {
440+ Write-Host " Try to pack .NET Framework project: $CsprojFile .Name ..." ;
437441
438442 # Check if there is a matching nuspec for the proj
439- $nuspecPath = [IO.Path ]::ChangeExtension($ProjectPath , " nuspec" )
443+ $nuspecPath = [IO.Path ]::ChangeExtension($CsprojFile .FullName , " nuspec" )
440444 if (-not (Test-Path $nuspecPath )) {
445+ Write-Host - Warning " Nuspec for project not found: $CsprojFile .Name" ;
441446 return ;
442447 }
443448
@@ -464,7 +469,7 @@ function Invoke-Pack($ProjectPath, [bool]$IsTool = $False, [bool]$IncludeSymbols
464469 CreateFolderIfNotExists $NugetPackageArtifacts ;
465470
466471 if (Get-CsprojIsSdkProject ($ProjectPath )) {
467- Invoke-PackSdkProject $ProjectPath $IsTool $ IncludeSymbols ;
472+ Invoke-PackSdkProject $ProjectPath $IncludeSymbols ;
468473 }
469474 else {
470475 Invoke-PackFrameworkProject $ProjectPath $IsTool $IncludeSymbols ;
@@ -483,7 +488,7 @@ function Invoke-Publish {
483488 Write-Host " Pushing packages from $NugetPackageArtifacts to $env: MORYX_PACKAGE_TARGET "
484489
485490 if ([string ]::IsNullOrEmpty($env: MORYX_PACKAGE_TARGET )) {
486- Write-Host " There is no package target given. Set the environment varialble MORYX_PACKAGE_TARGET to publish packages." ;
491+ Write-Host - Error " There is no package target given. Set the environment varialble MORYX_PACKAGE_TARGET to publish packages." ;
487492 Invoke-ExitCodeCheck 1 ;
488493 }
489494
0 commit comments