|
52 | 52 | <Exec Command='"$(NuGetExe)" restore .nuget\packages.config -PackagesDirectory packages -NonInteractive -Verbosity quiet' />
|
53 | 53 | </Target>
|
54 | 54 |
|
| 55 | + <ItemGroup> |
| 56 | + <_Testing_NetStandard1_3 Include="true;false" /> |
| 57 | + </ItemGroup> |
| 58 | + |
55 | 59 | <Target Name="RestorePackages" DependsOnTargets="DownloadNuGet">
|
56 |
| - <ItemGroup> |
57 |
| - <_ToRestore Include="Runtime.sln" /> |
58 |
| - <_ToRestore Include="test\Microsoft.TestCommon\Microsoft.TestCommon.csproj" |
59 |
| - AdditionalProperties="Testing_NetStandard1_3=true" /> |
60 |
| - </ItemGroup> |
61 | 60 | <Message Text="%0ARestoring NuGet packages..." Importance="High" />
|
62 |
| - <MSBuild Projects="@(_ToRestore)" Targets="Restore" |
| 61 | + |
| 62 | + <!-- |
| 63 | + Pre-restore Microsoft.TestCommon due to the many dependencies on this project. Batch it to cover the full |
| 64 | + set of references. Remove $(Platform) to avoid 'Any CPU' appearing in output paths. Can always restore in |
| 65 | + parallel because $(Testing_NetStandard1_3) changes both obj/ and bin/ folders entirely. |
| 66 | + --> |
| 67 | + <MSBuild Projects="test\Microsoft.TestCommon\Microsoft.TestCommon.csproj" Targets="Restore" |
| 68 | + BuildInParallel="true" |
| 69 | + Properties="Configuration=$(Configuration);CodeAnalysis=$(CodeAnalysis);StyleCopEnabled=$(StyleCopEnabled); |
| 70 | + RestorePackagesConfig=true;VisualStudioVersion=$(VisualStudioVersion); |
| 71 | + Testing_NetStandard1_3=%(_Testing_NetStandard1_3.Identity)" |
| 72 | + RemoveProperties="Platform" /> |
| 73 | + |
| 74 | + <MSBuild Projects="Runtime.sln" Targets="Restore" |
63 | 75 | BuildInParallel="$(RestoreInParallel)"
|
64 | 76 | Properties="Configuration=$(Configuration);CodeAnalysis=$(CodeAnalysis);StyleCopEnabled=$(StyleCopEnabled);
|
65 | 77 | RestorePackagesConfig=true;VisualStudioVersion=$(VisualStudioVersion)" />
|
|
79 | 91 | </Target>
|
80 | 92 |
|
81 | 93 | <Target Name="Build" DependsOnTargets="RestoreSkipStrongNames;RestorePackages;BuildTools">
|
82 |
| - <!-- we need to batch the solution files since they both build Microsoft.TestCommon --> |
83 |
| - <Error Condition=" '$(CodeAnalysis)' == 'true' and '$(Configuration)' == 'Release' " Text="Unable to run code analysis in Release configuration. Release assemblies do not include SuppressMessage attributes (so code analysis would always fail with the errors that are normally suppressed)." /> |
| 94 | + <Error Condition=" '$(CodeAnalysis)' == 'true' and '$(Configuration)' == 'Release' " |
| 95 | + Text="Unable to run code analysis in Release configuration. Release assemblies do not include SuppressMessage attributes (so code analysis would always fail with the errors that are normally suppressed)." /> |
84 | 96 | <MakeDir Directories="bin\$(Configuration)" />
|
| 97 | + |
| 98 | + <!-- |
| 99 | + Prebuild Microsoft.TestCommon due to the many dependencies on this project. Batch it to cover the full |
| 100 | + set of references. Remove $(Platform) to avoid 'Any CPU' appearing in output paths. Can always build in |
| 101 | + parallel because $(Testing_NetStandard1_3) changes both obj/ and bin/ folders entirely. |
| 102 | + --> |
| 103 | + <MSBuild Projects="test\Microsoft.TestCommon\Microsoft.TestCommon.csproj" Targets="Build" |
| 104 | + BuildInParallel="true" |
| 105 | + Properties="Configuration=$(Configuration);CodeAnalysis=$(CodeAnalysis);StyleCopEnabled=$(StyleCopEnabled); |
| 106 | + VisualStudioVersion=$(VisualStudioVersion); |
| 107 | + Testing_NetStandard1_3=%(_Testing_NetStandard1_3.Identity)" |
| 108 | + RemoveProperties="Platform" /> |
| 109 | + |
85 | 110 | <MSBuild
|
86 | 111 | Projects="Runtime.sln"
|
87 | 112 | BuildInParallel="$(BuildInParallel)"
|
88 | 113 | Targets="Build"
|
89 |
| - Properties="Configuration=$(Configuration);CodeAnalysis=$(CodeAnalysis);StyleCopEnabled=$(StyleCopEnabled);VisualStudioVersion=$(VisualStudioVersion)" /> |
| 114 | + Properties="Configuration=$(Configuration);CodeAnalysis=$(CodeAnalysis);StyleCopEnabled=$(StyleCopEnabled); |
| 115 | + VisualStudioVersion=$(VisualStudioVersion)" /> |
90 | 116 | </Target>
|
91 | 117 |
|
92 | 118 | <Target Name="UnitTest" DependsOnTargets="Build;PrintTestRunSummary" />
|
|
0 commit comments