Last active
August 17, 2023 10:22
-
-
Save trapezoid/90d5c09c51e4caa24a010572a04061eb to your computer and use it in GitHub Desktop.
Grpc.Toolsでのコード生成をOutputDir指定で永続的に吐き出したい場合に、dotnet cleanで生成されたコードが削除されるのを防ぐ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<!-- clean時の削除タスクの実行前に生成ファイル一覧をクリアして、削除後に元に戻す --> | |
<Target Name="_Protobuf_CoreClean_Stash" BeforeTargets="_Protobuf_CoreClean"> | |
<ItemGroup> | |
<Protobuf_ExpectedOutputsStashed Include="@(Protobuf_ExpectedOutputs)" /> | |
<Protobuf_ExpectedOutputs Remove="@(Protobuf_ExpectedOutputsStashed)" /> | |
</ItemGroup> | |
</Target> | |
<Target Name="_Protobuf_CoreClean_Restore" AfterTargets="_Protobuf_CoreClean"> | |
<ItemGroup> | |
<Protobuf_ExpectedOutputs Include="@(Protobuf_ExpectedOutputsStashed)" /> | |
</ItemGroup> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment