Skip to content

Commit a6f81c0

Browse files
committed
Conditionally import shared project in build process
Added a condition to skip importing the shared project in `Plugin-Shared.shproj` if `SkipSharedProject` is true. Updated the GitHub Actions workflow to set this property when building the solution.
1 parent 0070afa commit a6f81c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
# Build the solution
3333
- name: Build solution
34-
run: msbuild "source\Plugins.sln" /p:Configuration=Release /p:BuildProjectReferences=false
34+
run: msbuild "source\Plugins.sln" /p:Configuration=Release /p:SkipSharedProject=true
3535

3636
# Run tests (optional)
3737
#- name: Run tests

source/Plugin-Shared/Plugin-Shared.shproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
99
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
1010
<PropertyGroup />
11-
<Import Project="Plugin-Shared.projitems" Label="Shared" />
11+
<Import Project="Plugin-Shared.projitems" Label="Shared" Condition="'$(SkipSharedProject)' != 'true'"/>
1212
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
1313
</Project>

0 commit comments

Comments
 (0)