Skip to content

Commit 1df1c56

Browse files
committed
Update handling of Debug.ps1 in project files
Refactor `ListFunctions-NETFramework.csproj` and `ListFunctions-Next.csproj` to conditionally manage the inclusion of `Debug.ps1`. In non-Release configurations, it will be copied to the output directory, while in Release configurations, it will not be copied to either the output or publish directories. Previous entries for `Debug.ps1` have been removed to implement this logic.
1 parent 5faaa9e commit 1df1c56

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

src/engine/ListFunctions-NETFramework/ListFunctions-NETFramework.csproj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,18 @@
6161
<Compile Include="Nullable\NotNullWhenAttribute.cs" />
6262
<Compile Include="Properties\AssemblyInfo.cs" />
6363
</ItemGroup>
64-
<ItemGroup>
64+
<ItemGroup Condition="'$(Configuration)' != 'Release'">
6565
<Content Include="Debug.ps1">
6666
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
6767
</Content>
68+
</ItemGroup>
69+
<ItemGroup Condition="'$(Configuration)' == 'Release'">
70+
<Content Include="Debug.ps1">
71+
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
72+
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
73+
</Content>
74+
</ItemGroup>
75+
<ItemGroup>
6876
<None Include="app.config" />
6977
<None Include="packages.config" />
7078
</ItemGroup>

src/engine/ListFunctions-Next/ListFunctions-Next.csproj

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@
2020
<AssemblyVersion>3.0.0</AssemblyVersion>
2121
</PropertyGroup>
2222

23-
<ItemGroup>
24-
<None Remove="Debug.ps1" />
25-
</ItemGroup>
26-
27-
<ItemGroup>
28-
<Content Include="Debug.ps1">
29-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
30-
</Content>
31-
</ItemGroup>
23+
<ItemGroup Condition="'$(Configuration)' != 'Release'">
24+
<Content Include="Debug.ps1">
25+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
26+
</Content>
27+
</ItemGroup>
28+
<ItemGroup Condition="'$(Configuration)' == 'Release'">
29+
<Content Include="Debug.ps1">
30+
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
31+
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
32+
</Content>
33+
</ItemGroup>
3234

3335
<ItemGroup>
3436
<PackageReference Include="System.Management.Automation" Version="7.5.2" />

0 commit comments

Comments
 (0)