Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure rid specific libs projs get packaged #57193

Merged
merged 3 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,6 @@
<IsShippingAssembly Condition="$(IsExperimentalAssembly)">false</IsShippingAssembly>
<!-- We don't want Private packages to be shipped to NuGet.org -->
<IsShippingPackage Condition="$(MSBuildProjectName.Contains('Private')) or $(IsExperimentalAssembly)">false</IsShippingPackage>
<!-- A package isn't generated if in servicing or in runtimelab. Intended to be overridden at project level.
Excluding .sfxprojs as they have their own incremental servicing infra. -->
<GeneratePackage Condition="'$(GeneratePackage)' == ''">true</GeneratePackage>
<GeneratePackage Condition="(('$(PreReleaseVersionLabel)' == 'servicing' or
'$(GitHubRepositoryName)' == 'runtimelab') and
'$(MSBuildProjectExtension)' != '.sfxproj')">false</GeneratePackage>
<PlaceholderFile>$(RepositoryEngineeringDir)_._</PlaceholderFile>
</PropertyGroup>

Expand Down
18 changes: 1 addition & 17 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project InitialTargets="_OverridePackDependsOn">
<Project>
<PropertyGroup>
<!--
For non-SDK projects that import this file and then import Microsoft.Common.targets,
Expand Down Expand Up @@ -54,24 +54,8 @@
<PackageDescription Condition="'$(PackageDescription)' == '' and '$(UseRuntimePackageDisclaimer)' == 'true'">$(RuntimePackageDisclaimer)</PackageDescription>
<!-- Keep in sync as required by the Packaging SDK in Arcade. -->
<Description>$(PackageDescription)</Description>
<GenerateNuspecDependsOn>ErrorForMissingPackageDescription;$(GenerateNuspecDependsOn)</GenerateNuspecDependsOn>
</PropertyGroup>

<!-- Remove when https://github.com/NuGet/Home/issues/10405 is implemented and consumed. -->
<Target Name="ErrorForMissingPackageDescription"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also removing this block as it didn't work anymore for the NuGet pack as PackageDescription is always set to a default value.

Condition="'$(PackageDescription)' == ''">
<Error Text="Required property 'PackageDescription' is missing for $(MSBuildProjectName)." />
</Target>

<!-- <GeneratePackage /> controls if a package should be created by clearing out <PackDependsOn />. -->
<Target Name="_OverridePackDependsOn"
Condition="'$(IsPackable)' == 'true' and
'$(GeneratePackage)' != 'true'">
<PropertyGroup>
<PackDependsOn />
</PropertyGroup>
</Target>

<!--
Arcade SDK versioning is defined by static properties in a targets file: work around this by
moving properties based on versioning into a target.
Expand Down
9 changes: 0 additions & 9 deletions eng/packaging.props

This file was deleted.

14 changes: 12 additions & 2 deletions eng/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,25 @@
<!-- Don't restore prebuilt packages during sourcebuild. -->
<DisablePackageBaselineValidation Condition="'$(DotNetBuildFromSource)' == 'true'">true</DisablePackageBaselineValidation>
<PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$([MSBuild]::Subtract($(MajorVersion), 1)).0.0</PackageValidationBaselineVersion>
<!-- PackDependsOn is the right hook in a targets file if the NuGet.Build.Tasks.Pack nuget package is used, otherwise
BeforePack must be used. Setting both to ensure that we are always running before other targets. -->
<PackDependsOn>AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(PackDependsOn)</PackDependsOn>
<BeforePack>AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(BeforePack)</BeforePack>
<SymbolPackageOutputPath>$(PackageOutputPath)</SymbolPackageOutputPath>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddRuntimeSpecificFilesToPackage</TargetsForTfmSpecificContentInPackage>
<TargetsForTfmSpecificDebugSymbolsInPackage>$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage>
<IncludeBuildOutput Condition="'$(TargetsAnyOS)' != 'true' or '$(ExcludeFromPackage)' == 'true'">false</IncludeBuildOutput>
<!-- Don't include target platform specific dependencies, since we use the target platform to represent RIDs instead -->
<SuppressDependenciesWhenPacking Condition="'$(ExcludeFromPackage)' == 'true' or ('$(TargetsAnyOS)' != 'true' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0')))">true</SuppressDependenciesWhenPacking>
<PackageDesignerMarkerFile>$(MSBuildThisFileDirectory)useSharedDesignerContext.txt</PackageDesignerMarkerFile>
<!-- Generate packages in the allconfigurations build. -->
<GeneratePackageOnBuild Condition="'$(BuildAllConfigurations)' == 'true'">true</GeneratePackageOnBuild>
<!-- Generate packages for rid specific projects or for allconfigurations during build. -->
<!-- A package isn't generated if in servicing or in runtimelab. Intended to be overridden at project level. -->
<IsRIDSpecificProject Condition="$(MSBuildProjectName.StartsWith('runtime.')) and
!$(MSBuildProjectName.StartsWith('runtime.native'))">true</IsRIDSpecificProject>
<GeneratePackageOnBuild Condition="('$(BuildAllConfigurations)' == 'true' or
'$(IsRIDSpecificProject)' == 'true') and
'$(PreReleaseVersionLabel)' != 'servicing' and
'$(GitHubRepositoryName)' != 'runtimelab'">true</GeneratePackageOnBuild>
<!-- Search for the documentation file in the intellisense package and otherwise pick up the generated one. -->
<LibIntellisenseDocumentationFilePath>$(XmlDocFileRoot)1033\$(AssemblyName).xml</LibIntellisenseDocumentationFilePath>
<UseIntellisenseDocumentationFile Condition="'$(UseIntellisenseDocumentationFile)' == '' and Exists('$(LibIntellisenseDocumentationFilePath)')">true</UseIntellisenseDocumentationFile>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21405.3",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21405.3",
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21405.3",
"Microsoft.Build.NoTargets": "3.0.4",
"Microsoft.Build.NoTargets": "3.1.0",
"Microsoft.Build.Traversal": "3.0.23",
"Microsoft.NET.Sdk.IL": "6.0.0-rc.1.21401.3"
}
Expand Down
1 change: 0 additions & 1 deletion src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
</ItemGroup>

<Import Project="NetCoreAppLibrary.props" />
<Import Project="$(RepositoryEngineeringDir)packaging.props" Condition="'$(IsSourceProject)' == 'true'" />
<Import Project="$(RepositoryEngineeringDir)referenceAssemblies.props" Condition="'$(IsReferenceAssembly)' == 'true'" />
<Import Project="$(RepositoryEngineeringDir)targetframeworksuffix.props" Condition="'$(DesignTimeBuild)' != 'true'" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<IncludeBuildOutput>true</IncludeBuildOutput>
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<IsPackable>true</IsPackable>
<AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder>$(SymbolsSuffix)</AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder>
<TargetsForTfmSpecificDebugSymbolsInPackage>$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage>
<UseRuntimePackageDisclaimer>true</UseRuntimePackageDisclaimer>
Expand All @@ -26,12 +27,4 @@
TargetFramework="$(TargetFramework)" />
</ItemGroup>
</Target>

<!-- This is necessary as NuGet reads from this item when IncludeBuildOutput is set to true.
Remove when https://github.com/microsoft/MSBuildSdks/pull/276 is merged and a new version is consumed. -->
<Target Name="ClearBuiltProjectOutputGroupKeyOutput" BeforeTargets="_WalkEachTargetPerFramework;BuiltProjectOutputGroup">
<ItemGroup>
<BuiltProjectOutputGroupKeyOutput Remove="@(BuiltProjectOutputGroupKeyOutput)" />
</ItemGroup>
</Target>
</Project>