TL;DR
ビジュアル エラーなしでプロジェクトのビルドをスキップする Visual Studio ビルド前イベントを使用できますか?
詳細
pre-build
カスタム XML ファイルと、イベント中に XML からリソース ファイルを生成する Powershell スクリプトを含むプロジェクトがあります。
私の目標は、XML ファイルに変更がある場合にのみプロジェクトをビルドすることです。ファイルが変更されたかどうかは既に判断できますが、ビルドをスキップするように Visual Studio に通知することはできません。0
終了コード(ビルドを続行できる) またはその他の番号 (エラー リストに醜いエラーを表示) でスクリプトを停止します。
pre-build
プロジェクトをビルドするかスキップするかをスクリプトで決定できますか?
例
# Check to see if the current file is different from the file copied during build.
if((Test-Path $buildXmlFile) -and (Compare-Object -ReferenceObject (Get-Content $projectXmlFile) -DifferenceObject (Get-Content $buildXmlFile))){
Write-Host "Changes found! Rebuilding!"
} else {
Write-Host "No changes found! Skipping Build"
# Exit 0 will cause it to still build...
# Exit -1, Exit 1, etc. will cause a big error to show...
# HOW DO I SKIP???
}