Skip to content
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
17 changes: 3 additions & 14 deletions eng/packaging.props
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
<Project>

<PropertyGroup>
<DefaultAllowedOutputExtensionsInPackageBuildOutputFolder>.dll;.exe;.winmd;.json;.pri;</DefaultAllowedOutputExtensionsInPackageBuildOutputFolder>
<!-- Needs to be set in a props file when package referencing NuGet.Build.Tasks.Pack, as NuGet's targets file is imported before
packaging.targets and hence the BeforePack isn't respected. This can be moved back when the PackageReference is removed. -->
<BeforePack>AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(BeforePack)</BeforePack>
</PropertyGroup>

<ItemGroup>
<!-- Add a marker to help the designer optimize & share .NET Core packages -->
<None Include="$(PackageDesignerMarkerFile)"
PackagePath="$([System.IO.Path]::GetFileName('$(PackageDesignerMarkerFile)'))"
Pack="true"
Condition="'$(IncludeDesignerMarker)' != 'false'" />
</ItemGroup>

<!-- TODO: Remove when all required nuget pack features are part of the consumed SDK. -->
<ItemGroup>
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="$(NuGetBuildTasksPackVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>

</Project>
14 changes: 13 additions & 1 deletion eng/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<!-- 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>
<BeforePack>AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(BeforePack)</BeforePack>
<!-- Generate packages in the allconfigurations build. -->
<GeneratePackageOnBuild Condition="'$(BuildAllConfigurations)' == 'true'">true</GeneratePackageOnBuild>
<!-- Search for the documentation file in the intellisense package and otherwise pick up the generated one. -->
Expand All @@ -28,6 +27,19 @@
Condition="'$(DisablePackageBaselineValidation)' != 'true' and '$(PackageValidationBaselinePath)' == '' and '$(PackageValidationBaselineVersion)' != ''" />
</ItemGroup>

<!-- TODO: Remove when all required nuget pack features are part of the consumed SDK. -->
<ItemGroup>
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="$(NuGetBuildTasksPackVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>

<ItemGroup>
<!-- Add a marker to help the designer optimize & share .NET Core packages -->
<None Include="$(PackageDesignerMarkerFile)"
PackagePath="$([System.IO.Path]::GetFileName('$(PackageDesignerMarkerFile)'))"
Pack="true"
Condition="'$(IncludeDesignerMarker)' != 'false'" />
</ItemGroup>

<ItemGroup Condition="'$(AddNETFrameworkAssemblyReferenceToPackage)' == 'true'">
<_FrameworkAssemblyReferences Include="$(MSBuildProjectName)"
TargetFramework="net461" />
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</ItemGroup>

<Import Project="NetCoreAppLibrary.props" />
<Import Project="$(RepositoryEngineeringDir)packaging.props" Condition="'$(IsPackable)' == 'true'" />
<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
6 changes: 3 additions & 3 deletions src/libraries/System.IO.Ports/src/System.IO.Ports.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ System.IO.Ports.SerialPort</PackageDescription>
</ItemGroup>

<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<!-- Just reference the runtime meta package but don't build it to avoid unintentional Build/Pack invocations. -->
<ProjectReference Include="..\pkg\runtime.native.$(MSBuildProjectName).proj" />
<!-- Just reference the runtime packages but don't build them in order to avoid unintentional Build/Pack invocations. -->
<ProjectReference Include="..\pkg\runtime.native.$(MSBuildProjectName).proj" BuildReference="false" />
<!-- Make the runtime specific packages non transitive so that they aren't flowing into other projects. -->
<ProjectReference Include="..\pkg\runtime.*.runtime.native.$(MSBuildProjectName).proj" PrivateAssets="all" />
<ProjectReference Include="..\pkg\runtime.*.runtime.native.$(MSBuildProjectName).proj" BuildReference="false" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
Expand Down