|
66 | 66 | <ItemGroup> |
67 | 67 | <Tools Include="tools/GenAPI/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj" /> |
68 | 68 | <SqlServerLib Include="**/Microsoft.SqlServer.Server.csproj" /> |
| 69 | + <Abstractions Include="src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj" /> |
| 70 | + <Azure Include="src/Microsoft.Data.SqlClient.Extensions/Azure/src/Azure.csproj" /> |
69 | 71 | <NetFxDriver Include="**/netfx/**/Microsoft.Data.SqlClient*.csproj" Condition="'$(IsEnabledWindows)' == 'true'" /> |
70 | 72 | <NetCoreDriver Include="**/netcore/**/Microsoft.Data.SqlClient*.csproj" /> |
71 | 73 | <!-- Used to build .NET Standard DLL for lib folder from this project. --> |
|
103 | 105 | <Target Name="BuildTestsNetCore" DependsOnTargets="RestoreTestsNetCore;BuildAKVNetCore;BuildManualTestsNetCore"/> |
104 | 106 | <Target Name="BuildTestsNetFx" DependsOnTargets="RestoreTestsNetFx;BuildAKVNetFx;BuildManualTestsNetFx" Condition="$(IsEnabledWindows) == 'true'"/> |
105 | 107 |
|
| 108 | + <!-- Abstractions Targets --> |
| 109 | + <PropertyGroup> |
| 110 | + <AbstractionsProperties>$(CommonProperties)</AbstractionsProperties> |
| 111 | + |
| 112 | + <!-- |
| 113 | + If the AbstractionsPackageVersion property was supplied on the |
| 114 | + command-line, then pass it along to the Abstractions build. Otherwise, |
| 115 | + omit it entirely to avoid it expanding as empty here and thus overriding |
| 116 | + the default behaviour in the Abstractions project. Command-line |
| 117 | + properties take precedence over project defaults, even if their value is |
| 118 | + empty. For example: |
| 119 | +
|
| 120 | + dotnet build -p:AbstractionsPackageVersion= |
| 121 | +
|
| 122 | + That results in $(AbstractionsPackageVersion) being defined as empty, |
| 123 | + and cannot be overridden by the project. |
| 124 | + --> |
| 125 | + <AbstractionsProperties |
| 126 | + Condition="'$(AbstractionsPackageVersion)' != ''"> |
| 127 | + $(AbstractionsProperties);AbstractionsPackageVersion=$(AbstractionsPackageVersion) |
| 128 | + </AbstractionsProperties> |
| 129 | + |
| 130 | + <!-- Do the same for the AbstractionsAssemblyFileVersion property. --> |
| 131 | + <AbstractionsProperties |
| 132 | + Condition="'$(AbstractionsAssemblyFileVersion)' != ''"> |
| 133 | + $(AbstractionsProperties);AbstractionsAssemblyFileVersion=$(AbstractionsAssemblyFileVersion) |
| 134 | + </AbstractionsProperties> |
| 135 | + </PropertyGroup> |
| 136 | + |
| 137 | + <Target Name="RestoreAbstractions"> |
| 138 | + <MSBuild |
| 139 | + Projects="@(Abstractions)" |
| 140 | + Targets="Restore" |
| 141 | + Properties="$(AbstractionsProperties)" /> |
| 142 | + </Target> |
| 143 | + |
| 144 | + <Target Name="BuildAbstractions" DependsOnTargets="RestoreAbstractions"> |
| 145 | + <MSBuild |
| 146 | + Projects="@(Abstractions)" |
| 147 | + Targets="Build;Pack" |
| 148 | + Properties="$(AbstractionsProperties)" /> |
| 149 | + </Target> |
| 150 | + |
| 151 | + <!-- Azure Targets --> |
| 152 | + <PropertyGroup> |
| 153 | + <AzureProperties>$(CommonProperties)</AzureProperties> |
| 154 | + |
| 155 | + <!-- |
| 156 | + If the AzurePackageVersion property was supplied on the command-line, then |
| 157 | + pass it along to the Azure build. Otherwise, omit it entirely to avoid it |
| 158 | + expanding as empty here and thus overriding the default behaviour in the |
| 159 | + Azure project. Command-line properties take precedence over project |
| 160 | + defaults, even if their value is empty. For example: |
| 161 | +
|
| 162 | + dotnet build -p:AzurePackageVersion= |
| 163 | +
|
| 164 | + That results in $(AzurePackageVersion) being defined as empty, and cannot |
| 165 | + be overridden by the project. |
| 166 | + --> |
| 167 | + <AzureProperties |
| 168 | + Condition="'$(AzurePackageVersion)' != ''"> |
| 169 | + $(AzureProperties);AzurePackageVersion=$(AzurePackageVersion) |
| 170 | + </AzureProperties> |
| 171 | + |
| 172 | + <!-- Do the same for the AzureAssemblyFileVersion property. --> |
| 173 | + <AzureProperties |
| 174 | + Condition="'$(AzureAssemblyFileVersion)' != ''"> |
| 175 | + $(AzureProperties);AzureAssemblyFileVersion=$(AzureAssemblyFileVersion) |
| 176 | + </AzureProperties> |
| 177 | + </PropertyGroup> |
| 178 | + |
| 179 | + <Target Name="RestoreAzure"> |
| 180 | + <MSBuild |
| 181 | + Projects="@(Azure)" |
| 182 | + Targets="Restore" |
| 183 | + Properties="$(AzureProperties)" /> |
| 184 | + </Target> |
| 185 | + |
| 186 | + <Target Name="BuildAzure" DependsOnTargets="RestoreAzure"> |
| 187 | + <MSBuild |
| 188 | + Projects="@(Azure)" |
| 189 | + Targets="Build;Pack" |
| 190 | + Properties="$(AzureProperties)" /> |
| 191 | + </Target> |
| 192 | + |
106 | 193 | <!-- Other Targets --> |
107 | 194 | <Target Name="RestoreSqlServerLib"> |
108 | 195 | <MSBuild Projects="@(SqlServerLib)" Targets="restore" Properties="$(SqlServerLibProperties)" /> |
109 | 196 | </Target> |
110 | 197 |
|
111 | | - <Target Name="RestoreNetCore" DependsOnTargets="RestoreSqlServerLib"> |
| 198 | + <Target Name="RestoreNetCore" DependsOnTargets="RestoreSqlServerLib;RestoreAbstractions"> |
112 | 199 | <MSBuild Projects="@(NetCoreDriver)" Targets="restore" Properties="$(ProjectProperties)" /> |
113 | 200 | </Target> |
114 | 201 |
|
115 | 202 | <Target Name="RestoreTestsNetCore" DependsOnTargets="RestoreNetCore"> |
116 | 203 | <MSBuild Projects="@(ManualTests)" Targets="restore" Properties="$(TestProjectProperties)" /> |
117 | 204 | </Target> |
118 | 205 |
|
119 | | - <Target Name="RestoreNetFx" DependsOnTargets="RestoreSqlServerLib" Condition="'$(IsEnabledWindows)' == 'true'"> |
| 206 | + <Target Name="RestoreNetFx" DependsOnTargets="RestoreSqlServerLib;RestoreAbstractions" Condition="'$(IsEnabledWindows)' == 'true'"> |
120 | 207 | <MSBuild Projects="@(NetFxDriver)" Targets="restore" Properties="$(ProjectProperties)" /> |
121 | 208 | </Target> |
122 | 209 |
|
|
132 | 219 | <MSBuild Projects="@(Tools)" Properties="$(CommonProperties)" /> |
133 | 220 | </Target> |
134 | 221 |
|
135 | | - <Target Name="BuildNetFx" DependsOnTargets="RestoreNetFx;BuildSqlServerLib" Condition="'$(IsEnabledWindows)' == 'true'"> |
| 222 | + <Target Name="BuildNetFx" DependsOnTargets="RestoreNetFx;BuildSqlServerLib;BuildAbstractions" Condition="'$(IsEnabledWindows)' == 'true'"> |
136 | 223 | <MSBuild Projects="@(NetFxDriver)" Properties="$(CI);Platform=AnyCPU;$(ProjectProperties);$(NugetPackProperties);" /> |
137 | 224 | </Target> |
138 | 225 |
|
|
149 | 236 | <MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> |
150 | 237 | </Target> |
151 | 238 |
|
152 | | - <Target Name="BuildNetCore" DependsOnTargets="RestoreNetCore;BuildSqlServerLib"> |
| 239 | + <Target Name="BuildNetCore" DependsOnTargets="RestoreNetCore;BuildSqlServerLib;BuildAbstractions"> |
153 | 240 | <MSBuild Projects="@(NetCoreDriver)" Properties="$(CI);Platform=AnyCPU;$(ProjectProperties)" /> |
154 | 241 | </Target> |
155 | 242 |
|
156 | | - <Target Name="BuildNetCoreAllOS" DependsOnTargets="RestoreNetCore;BuildSqlServerLib"> |
| 243 | + <Target Name="BuildNetCoreAllOS" DependsOnTargets="RestoreNetCore;BuildSqlServerLib;BuildAbstractions"> |
157 | 244 | <MSBuild Projects="@(NetCoreDriver)" Properties="$(CI);$(ProjectProperties);Platform=AnyCPU;OSGroup=Unix;" RemoveProperties="TargetsWindows;TargetsUnix;" /> |
158 | 245 | <MSBuild Projects="@(NetCoreDriver)" Properties="$(CI);$(ProjectProperties);Platform=AnyCPU;OSGroup=Windows_NT;" RemoveProperties="TargetsWindows;TargetsUnix;" Condition="'$(IsEnabledWindows)' == 'true'" /> |
159 | 246 | <MSBuild Projects="@(NetCoreDriver)" Properties="$(CI);$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS;" RemoveProperties="TargetsWindows;TargetsUnix;" /> |
|
349 | 436 | <RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", "bin", SearchOption.AllDirectories))' /> |
350 | 437 | <RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", ".nuget", SearchOption.AllDirectories))' /> |
351 | 438 | <RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", "obj", SearchOption.AllDirectories))' /> |
| 439 | + <RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".","packages", SearchOption.AllDirectories))' /> |
352 | 440 | </Target> |
353 | 441 |
|
354 | 442 | <!-- AKV Targets ========================================================= --> |
|
0 commit comments