Skip to content

Commit

Permalink
Coalesce property groups
Browse files Browse the repository at this point in the history
  • Loading branch information
DHancock committed Oct 6, 2024
1 parent d3c5ef7 commit c57735b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
18 changes: 6 additions & 12 deletions SourceGenerator/SourceGenerator.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<GeneratedFilePath>$(SolutionDir)Countdown\Models\PostfixMap.g.cs</GeneratedFilePath>
</PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<Nullable>enable</Nullable>

<PropertyGroup Condition="!exists('$(GeneratedFilePath)')">
<!-- always trigger a rebuild and post build event -->
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
<GeneratedFilePath>$(SolutionDir)Countdown\Models\PostfixMap.g.cs</GeneratedFilePath>
<DisableFastUpToDateCheck Condition="!exists('$(GeneratedFilePath)')">true</DisableFastUpToDateCheck>
</PropertyGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
Expand Down
19 changes: 6 additions & 13 deletions WordListGenerator/WordListGenerator.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<Nullable>enable</Nullable>

<GeneratedFilePath>$(SolutionDir)Countdown\Resources\wordlist.dat</GeneratedFilePath>
<DisableFastUpToDateCheck Condition="!exists('$(GeneratedFilePath)')">true</DisableFastUpToDateCheck>
</PropertyGroup>

<PropertyGroup Condition="!exists('$(GeneratedFilePath)')">
<!-- always trigger a rebuild and post build event -->
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="start /wait /b &quot;&quot; &quot;$(TargetDir)$(TargetName).exe&quot; &quot;$(ProjectDir)Input&quot; &quot;$(GeneratedFilePath)&quot;" />
</Target>

</Project>

0 comments on commit c57735b

Please sign in to comment.