Skip to content

Commit

Permalink
Remove Traversal project in favor of the solution file (#157)
Browse files Browse the repository at this point in the history
* Remove Traversal project in favor of the solution file

* Classify test utility projects and add UnsetIsPackableForNonSourceProjects switch

* Update unsetispackable.targets
  • Loading branch information
ViktorHofer authored Nov 8, 2024
1 parent 5a038ad commit fba2ed2
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 37 deletions.
8 changes: 0 additions & 8 deletions Build.proj

This file was deleted.

3 changes: 0 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
<BeforeTargetFrameworkInferenceTargets>$(RepositoryEngineeringDir)BeforeTargetFrameworkInference.targets</BeforeTargetFrameworkInferenceTargets>
<!-- Only upgrade NuGetAudit warnings to errors for official builds. -->
<WarningsNotAsErrors Condition="'$(OfficialBuild)' != 'true'">$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
<IsSourceProject Condition="'$(IsSourceProject)' == '' and
'$(IsTestProject)' != 'true' and
'$(UsingMicrosoftTraversalSdk)' != 'true'">true</IsSourceProject>
<!-- Prevent generating docs xmls from triple slash by default. Use the commited xml files instead.
Individual projects that want to generate docs from triple slash can set this to true. -->
<GenerateDocumentationFile>false</GenerateDocumentationFile>
Expand Down
8 changes: 8 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<Project>

<PropertyGroup>
<IsSourceProject Condition="'$(IsSourceProject)' == '' and
'$(IsTestProject)' != 'true' and
'$(IsTestUtilityProject)' != 'true'">true</IsSourceProject>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)unsetispackable.targets" Condition="'$(UnsetIsPackableForNonSourceProjects)' == 'true' and '$(IsSourceProject)' != 'true'" />
<Import Project="$(RepositoryEngineeringDir)resources.targets" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<Import Project="$(RepositoryEngineeringDir)testing\runsettings.targets" Condition="'$(IsTestProject)' == 'true'" />
<Import Project="$(RepositoryEngineeringDir)placeholderpackaging.targets" Condition="'$(IsPlaceholderTargetFramework)' == 'true'" />
<Import Project="$(RepositoryEngineeringDir)packaging.targets" Condition="'$(IsPackable)' == 'true'" />
Expand Down
7 changes: 0 additions & 7 deletions eng/Build.props

This file was deleted.

3 changes: 2 additions & 1 deletion eng/pipelines/maintenance-packages-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ stages:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
/p:SkipTests=true
/p:Test=false
/p:IsPackable=true
/p:UnsetIsPackableForNonSourceProjects=true
$(_AdditionalBuildArgs)
$(_InternalBuildArgs)
displayName: 'Build and pack'
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/maintenance-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ extends:
- script: eng\common\cibuild.cmd
-configuration Release
-prepareMachine
/p:SkipTests=true
/p:Test=false
$(_AdditionalBuildArgs)
$(_InternalBuildArgs)
displayName: $(_BuildJobDisplayName)
Expand Down
8 changes: 8 additions & 0 deletions eng/unsetispackable.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project TreatAsLocalProperty="IsPackable">

<!-- Unset global IsPackable property. -->
<PropertyGroup>
<IsPackable />
</PropertyGroup>

</Project>
1 change: 0 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24525.2",
"Microsoft.Build.Traversal": "3.4.0",
"Microsoft.NET.Sdk.IL": "8.0.0"
}
}
11 changes: 0 additions & 11 deletions src/System.Data.SqlClient/tests/Directory.Build.props

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>$(NetMinimum)-unix;$(NetMinimum)-windows</TargetFrameworks>
<IsTestUtilityProject>true</IsTestUtilityProject>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<TargetFrameworks>$(NetMinimum)-unix;$(NetMinimum)-windows</TargetFrameworks>
<NoWarn>$(NoWarn);CA2208;</NoWarn>
<IsTestUtilityProject>true</IsTestUtilityProject>
<NoWarn>$(NoWarn);CA2208</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>$(NetMinimum)-unix;$(NetMinimum)-windows</TargetFrameworks>
<IsTestUtilityProject>true</IsTestUtilityProject>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>$(NetMinimum)-unix;$(NetMinimum)-windows</TargetFrameworks>
<IsTestUtilityProject>true</IsTestUtilityProject>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetMinimum)-windows;$(NetMinimum)-unix;$(NetCurrent)-windows;$(NetCurrent)-unix;</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>$(NetMinimum)-windows;$(NetMinimum)-unix;$(NetCurrent)-windows;$(NetCurrent)-unix</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<NoWarn>$(NoWarn);CA1001;CA1051;CA1068;CA1069;CA1304;CA1309;CA1310;CA1311;CA1419;CA1507;CA1510;CA1512;CA1513;CA1711;CA1716;CA1805;CA1806;CA1816;CA1822;CA1830;CA1834;CA1835;CA1836;CA1840;CA1844;CA1852;CA1859;CA1861;CA1862;CA1863;CA1866;CA2016;CA2101;CA2200;CA2201;CA2208;CA2211;CA2219;CA2241;CA2249;CA2251;CA5366;CS0168;CS0618;CS0649;IDE0073;SYSLIB0004;SYSLIB0023;nullable</NoWarn>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<ClsCompliant>false</ClsCompliant>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<NoWarn>$(NoWarn);CA1001;CA1051;CA1068;CA1069;CA1309;CA1310;CA1419;CA1507;CA1711;CA1716;CA1805;CA1806;CA1816;CA1822;CA1830;CA1834;CA1835;CA1836;CA1840;CA1844;CA2016;CA2101;CA2200;CA2201;CA2208;CA2211;CA2219;CA2249;CA2251;CA5359;CA5366;CS0168;CS0649;IDE0073;SYSLIB0004;SYSLIB0023;nullable</NoWarn>
<IsTestUtilityProject>true</IsTestUtilityProject>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<ClsCompliant>false</ClsCompliant>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<NoWarn>$(NoWarn);CA1001;CA1068;CA1069;CA1304;CA1309;CA1310;CA1419;CA1507;CA1711;CA1716;CA1805;CA1806;CA1816;CA1822;CA1830;CA1834;CA1835;CA1836;CA1840;CA1844;CA1847;CA2016;CA2101;CA2200;CA2201;CA2208;CA2211;CA2219;CA2249;CA2251;CA5366;CS0168;CS0649;IDE0073;SYSLIB0004;SYSLIB0023;nullable</NoWarn>
<IsTestUtilityProject>true</IsTestUtilityProject>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/System.Data.SqlClient/tests/Tools/TDS/TDS/TDS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<AssemblyName>Microsoft.SqlServer.TDS</AssemblyName>
<ClsCompliant>false</ClsCompliant>
<NoWarn>$(NoWarn);CA1001;CA1068;CA1069;CA1309;CA1310;CA1419;CA1507;CA1711;CA1716;CA1805;CA1806;CA1816;CA1822;CA1830;CA1834;CA1835;CA1836;CA1840;CA1844;CA2016;CA2101;CA2200;CA2201;CA2208;CA2211;CA2219;CA2249;CA2251;CA5366;CS0168;CS0649;IDE0073;SYSLIB0004;SYSLIB0023;nullable</NoWarn>
<IsTestUtilityProject>true</IsTestUtilityProject>
</PropertyGroup>

</Project>

0 comments on commit fba2ed2

Please sign in to comment.