我在解决方案中有 3 个项目,一个 WPFApplication 和 2 个 ClassLibrary 项目当我构建解决方案时,我得到以下错误..
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.targets(2868,9):错误 MSB3023:没有为复制指定目标。请提供“DestinationFiles”或“DestinationFolder”。[D:\Nusrofe\GrokPSake2\ClassLibrary1\ClassLibrary1.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3471,9):错误 MSB4044:未为“FindUnderPath”任务提供所需参数“Path”的值。[D:\Nusrofe\GrokPSake2\ClassLibrary1\ClassLibrary1.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2868,9):错误 MSB3023:没有为复制指定目标。请提供“DestinationFiles”或“DestinationFolder”。[D:\Nusrofe\GrokPSake2\ClassLibrary2\ClassLibrary2.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3471,9):错误 MSB4044:未为“FindUnderPath”任务提供所需参数“Path”的值。[D:\Nusrofe\GrokPSake2\ClassLibrary2\ClassLibrary2.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3471,9):错误 MSB4044:未为“FindUnderPath”任务提供所需参数“Path”的值。[D:\Nusrofe\GrokPSake2\WpfApp\WpfApp.csproj]
build2.ps1:错误执行命令:msbuild $sln_file "/p:OutDir=$build_artifacts_dir" /p:Configuration=Release /v:quiet
谢谢——科库