내가 .NET 3.5에서 우리 회사의 C# 프로젝트에 대한 psake와 빌드 스크립트를 만들려고 해요,하지만 난 그것을 실행하면 오류와 함께 실패와 성공빌드 C# .NET을 3.5 프로젝트는 psake 실패하지만 msbuild를
default parameter specifiers are not permitted
나는 Google을 사용하지 않으며 기능상 기본 매개 변수를 허용하지 않는 .NET 3.5의 문제인 것처럼 보입니다.
그러나 msbuild.exe로 빌드 된 동일한 프로젝트가 성공한 것은 이상합니다. psake의 $ framework 변수를 '3.5x86'과 '3.5x64'로 설정하려했지만 그 중 아무 것도 도움이되지 않았습니다.
psake의 문제점이나 빠진 비밀 변수가 있는지 생각해보십시오.
는내 psake 스크립트 : 스크립트의
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$framework = '3.5x86'
$serverSln = $scriptDir+'\..\Server\Server.sln'
$clientSln = $scriptDir+'\..\Client\Client.sln'
$outDirServer = $scriptDir+'\..\Binaries\Server'
$outDirClient = $scriptDir+'\..\Binaries\Client'
task default -depends Full
task Full -depends Clean, BuildServer, BuildClient #, BuildAccs, DeployRelease
task BuildServer {
#Framework '3.5'
exec { msbuild $serverSln /t:Build /p:Configuration=Release /v:quiet }
}
task BuildClient {
#Framework '3.5'
exec { msbuild $clientSln /t:Build /p:Configuration=Deploy /v:quiet }
exec { msbuild $clientSln /t:Build /p:Configuration=Release /v:quiet }
}
task Clean {
Write-Host Cleaning
if (Test-Path $outDirClient)
{
rd $outDirClient -rec -force | out-null
}
if (Test-Path $outDirServer)
{
rd $outDirServer -rec -force | out-null
}
}
출력 :
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$framework = '3.5x86'
$serverSln = $scriptDir+'\..\Server\Server.sln'
$clientSln = $scriptDir+'\..\Client\Client.sln'
$outDirServer = $scriptDir+'\..\Binaries\Server'
$outDirClient = $scriptDir+'\..\Binaries\Client'
task default -depends Full
task Full -depends Clean, BuildServer, BuildClient #, BuildAccs, DeployRelease
task BuildServer {
#Framework '3.5'
exec { msbuild $serverSln /t:Build /p:Configuration=Release /v:quiet }
}
task BuildClient {
#Framework '3.5'
exec { msbuild $clientSln /t:Build /p:Configuration=Deploy /v:quiet }
exec { msbuild $clientSln /t:Build /p:Configuration=Release /v:quiet }
}
task Clean {
Write-Host Cleaning
if (Test-Path $outDirClient)
{
rd $outDirClient -rec -force | out-null
}
if (Test-Path $outDirServer)
{
rd $outDirServer -rec -force | out-null
}
}
빌드를 이해하는 데 문제가있는 것처럼 보입니다. VS는 MSSBuild 4.0 및 3.5를 대상으로 프로젝트를 구축 중입니다. 나는 msbuild 3.5를 사용했고 혼란 스러웠다. 자세한 내용은 여기에서 찾을 수 있습니다. http://stackoverflow.com/questions/4315057/my-project-builds-with-msbuild-4-but-not-with-msbuild-3-5-even-though-im-target# comment4688131_4315192 – kraklin