forked from microsoft/slngen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Solution.targets
28 lines (27 loc) · 1.48 KB
/
Directory.Solution.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<Project InitialTargets="RemoveProjectsToSkip">
<!--
RemoveProjectsToSkip removes projects from the solution if they can't be built. It determines
this by calling the ShouldSkipProject target for each project so it can indicate if a project
cannot be built and why.
-->
<Target Name="RemoveProjectsToSkip">
<MSBuild BuildInParallel="True"
Properties="BuildingSolutionFile=true; CurrentSolutionConfigurationContents=$(CurrentSolutionConfigurationContents); SolutionDir=$(SolutionDir); SolutionExt=$(SolutionExt); SolutionFileName=$(SolutionFileName); SolutionName=$(SolutionName); SolutionPath=$(SolutionPath);"
SkipNonexistentProjects="%(ProjectReference.SkipNonexistentProjects)"
Projects="@(ProjectReference)"
Targets="ShouldSkipProject">
<Output TaskParameter="TargetOutputs"
ItemName="ProjectToSkip" />
</MSBuild>
<ItemGroup>
<ProjectReference Remove="@(ProjectToSkip)" />
</ItemGroup>
<Message Text="Skipping project "%(ProjectToSkip.Identity)". %(ProjectToSkip.Message)"
Condition="@(ProjectToSkip->Count()) > 0 And '$(MSBuildRestoreSessionId)' == ''"
Importance="High" />
</Target>
<PropertyGroup>
<!-- The target framework 'net5.0' is out of support and will not receive security updates in the future. -->
<CheckEolTargetFramework Condition="'$(TargetFramework)' == 'net5.0'">false</CheckEolTargetFramework>
</PropertyGroup>
</Project>