执行MSBuild命令时发生PSake错误

执行MSBuild命令时发生PSake错误,msbuild,psake,Msbuild,Psake,我在解决方案中有3个项目, 一个WPF应用程序和两个类库项目 当我构建解决方案时,我得到以下错误 properties { $base_dir = resolve-path . $build_dir = "$base_dir\build" $buildartifacts_dir = "$build_dir\BuildArtifacts" $sln_file = "$base_dir\Hello.sln" } task default -depends

我在解决方案中有3个项目, 一个WPF应用程序和两个类库项目 当我构建解决方案时,我得到以下错误

properties { 
    $base_dir = resolve-path . 
    $build_dir = "$base_dir\build" 
    $buildartifacts_dir = "$build_dir\BuildArtifacts" 
    $sln_file = "$base_dir\Hello.sln" 
} 

task default -depends Compile 

task Clean { 
    Write-Host "Cleaning solution" -ForegroundColor Green 
    remove-item -force -recurse $buildartifacts_dir -ErrorAction 
SilentlyContinue 
} 

task Init -depends Clean { 
    Write-Host "Creating BuildArtifacts directory" -ForegroundColor Green 
    new-item $buildartifacts_dir -itemType directory 
} 


task Compile -depend Init { 
   Write-Host "Compiling ---" $sln_file -ForegroundColor Green 
   Exec { msbuild $sln_file "/p:OutDir=$build_artifacts_dir" 
/p:Configuration=Release /v:quiet } 

} 
我得到以下错误-我做错了什么

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets2868­,9: 错误MSB3023:未为复制指定目标。请提供DestinationFiles或DestinationFolder。[D:\Nusrofe\GrokPSake2\ClassLibrary1\ClassLibrary1.csproj]

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets3471­,9: 错误MSB4044:未提供FindUnderPath任务 所需参数路径的值。[D:\Nusrofe\GrokPSake2\ClassLibrary1\ClassLibrary1.csproj]

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets2868­,9: 错误MSB3023:未为复制指定目标。Ple ase提供DestinationFiles或DestinationFolder。[D:\Nusrofe\GrokPSake2\ClassLibrary2\ClassLibrary2.csproj]

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets3471­,9: 错误MSB4044:未提供FindUnderPath任务 所需参数路径的值。[D:\Nusrofe\GrokPSake2\ClassLibrary2\ClassLibrary2.csproj]

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets3471­,9: 错误MSB4044:未提供FindUnderPath任务 所需参数路径的值。[D:\Nusrofe\GrokPSake2\WpfApp\WpfApp.csproj]

build2.ps1:执行命令时出错:msbuild$sln\u文件 /p:OutDir=$build\u artifacts\u dir/p:Configuration=Release/v:quiet

谢谢- 在编译任务中,$buildartifacts\u dir变量中似乎有一个多余的下划线。MSBuild可能不知道该做什么,因为本质上是为OutDir传递一个空位置