<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>
<!-- 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. -->
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" />
</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'" />
</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'">