From 0c7110c561c1e83f68af1471803d5c992f2a3140 Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Mon, 29 Mar 2021 11:51:22 -0700 Subject: [PATCH] Refactor props and target file naming (#19661) - Use better names for the properties that control what set of imports get pulled in at the root. - Define IsMgmtLibrary property for mgmt - Define IsClientLIbrary property for new Azure.Core base library - Remove incorrectly defined IsDataPlaneProject property - Rename Directory.Build.Data.props/targets to Directory.Build.Common.props/targets --- Directory.Build.props | 12 ++++--- Directory.Build.targets | 13 ++++++-- ...ata.props => Directory.Build.Common.props} | 33 ++++++++++++------- ...targets => Directory.Build.Common.targets} | 14 ++++---- eng/Packages.Data.props | 2 +- sdk/Directory.Build.props | 16 --------- .../Directory.Build.props | 2 +- .../System.Memory.Data/Directory.Build.props | 1 + .../keyvaultproxy/Directory.Build.props | 3 +- ...nager.MachineLearningServices.Tests.csproj | 2 +- sdk/mgmtcommon/Directory.Build.props | 3 +- .../Directory.Build.props | 11 +++++++ ...e.MixedReality.Authentication.Tests.csproj | 8 ----- sdk/search/Directory.Build.props | 15 ++++----- .../src/Azure.Graph.Rbac.csproj | 4 +-- 15 files changed, 73 insertions(+), 66 deletions(-) rename eng/{Directory.Build.Data.props => Directory.Build.Common.props} (85%) rename eng/{Directory.Build.Data.targets => Directory.Build.Common.targets} (97%) delete mode 100644 sdk/Directory.Build.props create mode 100644 sdk/mixedreality/Azure.MixedReality.Authentication/tests/Shared.Azure.MixedReality.Authentication.Tests/Directory.Build.props diff --git a/Directory.Build.props b/Directory.Build.props index ad17f2062e77..5c6eb4f1aea2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,8 +4,9 @@ $(MSBuildThisFileDirectory)eng $(RepoRoot)src $(RepoRoot)src/SDKs - true - true + true + true + true @@ -33,8 +34,11 @@ $(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\ $(ArtifactsPackagesDir)/$(MSBuildProjectName) + + + import-required-properties - - + + diff --git a/Directory.Build.targets b/Directory.Build.targets index 6683cc48d2e5..08a3c1c26b20 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,4 +1,11 @@  - - - \ No newline at end of file + + + <_Parameter1>SourcePath + <_Parameter2>$(MSBuildProjectDirectory) + + + + + + diff --git a/eng/Directory.Build.Data.props b/eng/Directory.Build.Common.props similarity index 85% rename from eng/Directory.Build.Data.props rename to eng/Directory.Build.Common.props index 7df7c16da38f..fa89254a1710 100644 --- a/eng/Directory.Build.Data.props +++ b/eng/Directory.Build.Common.props @@ -1,4 +1,22 @@  + + + + true + 3.0.0-beta.20210319.1 + + + true + + true + true + true + true + true + true + true + + latest @@ -40,16 +58,6 @@ - true - 3.0.0-beta.20210319.1 - true - true - true - true - true - true - true - true true true @@ -65,7 +73,7 @@ - + $(NoWarn); CA1812; @@ -109,7 +117,7 @@ net461;netcoreapp2.1;netcoreapp3.1;net5.0 - + @@ -173,6 +181,7 @@ $(MSBuildThisFileDirectory)AzSdkTestLibKey.snk + $(RepoEngPath)\nunit.runsettings diff --git a/eng/Directory.Build.Data.targets b/eng/Directory.Build.Common.targets similarity index 97% rename from eng/Directory.Build.Data.targets rename to eng/Directory.Build.Common.targets index 62d24f93e94c..050a1163b7c3 100644 --- a/eng/Directory.Build.Data.targets +++ b/eng/Directory.Build.Common.targets @@ -11,7 +11,7 @@ - + $([MSBuild]::NormalizeDirectory($(MSBuildProjectDirectory)/../)) @@ -24,7 +24,7 @@ - + $(MSBuildThisFileDirectory)common/scripts/Verify-ChangeLog.ps1 $([MSBuild]::NormalizeDirectory($(MSBuildProjectDirectory)/../))CHANGELOG.md @@ -113,7 +113,7 @@ - + @@ -140,7 +140,7 @@ - + @@ -156,7 +156,7 @@ - + @@ -182,7 +182,7 @@ - + - + <_ReferencePathDirectories Include="@(ReferencePath -> '%(RootDir)%(Directory)')" /> diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index faa2fff2efbb..13ff2e7d5a0b 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -95,7 +95,7 @@ - diff --git a/sdk/Directory.Build.props b/sdk/Directory.Build.props deleted file mode 100644 index 88eaa6d29192..000000000000 --- a/sdk/Directory.Build.props +++ /dev/null @@ -1,16 +0,0 @@ - - - true - true - - - - <_Parameter1>SourcePath - <_Parameter2>$(MSBuildProjectDirectory) - - - - - $(RepoEngPath)\nunit.runsettings - - diff --git a/sdk/applicationinsights/Microsoft.Azure.ApplicationInsights.Query/Directory.Build.props b/sdk/applicationinsights/Microsoft.Azure.ApplicationInsights.Query/Directory.Build.props index e60262993fb6..e31f5d6e9b27 100644 --- a/sdk/applicationinsights/Microsoft.Azure.ApplicationInsights.Query/Directory.Build.props +++ b/sdk/applicationinsights/Microsoft.Azure.ApplicationInsights.Query/Directory.Build.props @@ -1,6 +1,6 @@  - true + true diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/tests/Azure.ResourceManager.MachineLearningServices.Tests.csproj b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/tests/Azure.ResourceManager.MachineLearningServices.Tests.csproj index 13144dfbc3d4..224f8c4efeeb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/tests/Azure.ResourceManager.MachineLearningServices.Tests.csproj +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/tests/Azure.ResourceManager.MachineLearningServices.Tests.csproj @@ -5,7 +5,7 @@ - + diff --git a/sdk/mgmtcommon/Directory.Build.props b/sdk/mgmtcommon/Directory.Build.props index 2c80ae22f0fa..730aa287046e 100644 --- a/sdk/mgmtcommon/Directory.Build.props +++ b/sdk/mgmtcommon/Directory.Build.props @@ -1,7 +1,6 @@  - true - false + true true diff --git a/sdk/mixedreality/Azure.MixedReality.Authentication/tests/Shared.Azure.MixedReality.Authentication.Tests/Directory.Build.props b/sdk/mixedreality/Azure.MixedReality.Authentication/tests/Shared.Azure.MixedReality.Authentication.Tests/Directory.Build.props new file mode 100644 index 000000000000..f850158b6c1c --- /dev/null +++ b/sdk/mixedreality/Azure.MixedReality.Authentication/tests/Shared.Azure.MixedReality.Authentication.Tests/Directory.Build.props @@ -0,0 +1,11 @@ + + + true + true + true + + + + diff --git a/sdk/mixedreality/Azure.MixedReality.Authentication/tests/Shared.Azure.MixedReality.Authentication.Tests/Shared.Azure.MixedReality.Authentication.Tests.csproj b/sdk/mixedreality/Azure.MixedReality.Authentication/tests/Shared.Azure.MixedReality.Authentication.Tests/Shared.Azure.MixedReality.Authentication.Tests.csproj index 841108535874..b279aa580b49 100644 --- a/sdk/mixedreality/Azure.MixedReality.Authentication/tests/Shared.Azure.MixedReality.Authentication.Tests/Shared.Azure.MixedReality.Authentication.Tests.csproj +++ b/sdk/mixedreality/Azure.MixedReality.Authentication/tests/Shared.Azure.MixedReality.Authentication.Tests/Shared.Azure.MixedReality.Authentication.Tests.csproj @@ -1,14 +1,6 @@  - true - true - true Enable - - - - - $(RequiredTargetFrameworks) Azure.MixedReality.Authentication.Tests diff --git a/sdk/search/Directory.Build.props b/sdk/search/Directory.Build.props index e63ed8cc732a..207eb1890a57 100644 --- a/sdk/search/Directory.Build.props +++ b/sdk/search/Directory.Build.props @@ -1,10 +1,9 @@  - - - - - $(IntermediateOutputPath)$(TargetFramework)\$(MSBuildProjectName).xml - - - + + + + $(IntermediateOutputPath)$(TargetFramework)\$(MSBuildProjectName).xml + diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Azure.Graph.Rbac.csproj b/sdk/testcommon/Azure.Graph.Rbac/src/Azure.Graph.Rbac.csproj index a3113ac3c734..39f3569c36b6 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Azure.Graph.Rbac.csproj +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Azure.Graph.Rbac.csproj @@ -4,9 +4,9 @@ Azure.Graph.Rbac Azure management client SDK for Azure resource provider Microsoft.ResourceGraph azure;management;resourcegraph - - true + true $(NoWarn);AZC0001;AZC0008;AZC0012;CS1591