|
4 | 4 | <EnablePackageValidation>true</EnablePackageValidation>
|
5 | 5 | <!-- Don't restore prebuilt packages during sourcebuild. -->
|
6 | 6 | <DisablePackageBaselineValidation Condition="'$(DotNetBuildFromSource)' == 'true'">true</DisablePackageBaselineValidation>
|
7 |
| - <PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$([MSBuild]::Subtract($(PreviousReleaseMajorVersion), 1)).0.0</PackageValidationBaselineVersion> |
| 7 | + <PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$(NetCoreAppLatestStablePackageBaselineVersion)</PackageValidationBaselineVersion> |
8 | 8 | <!-- PackDependsOn is the right hook in a targets file if the NuGet.Build.Tasks.Pack nuget package is used, otherwise
|
9 | 9 | BeforePack must be used. Setting both to ensure that we are always running before other targets. -->
|
10 | 10 | <PackDependsOn>AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(PackDependsOn)</PackDependsOn>
|
|
14 | 14 | <TargetsForTfmSpecificDebugSymbolsInPackage>$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage>
|
15 | 15 | <IncludeBuildOutput Condition="'$(TargetsAnyOS)' != 'true' or '$(ExcludeFromPackage)' == 'true'">false</IncludeBuildOutput>
|
16 | 16 | <!-- Don't include target platform specific dependencies, since we use the target platform to represent RIDs instead -->
|
17 |
| - <SuppressDependenciesWhenPacking Condition="'$(ExcludeFromPackage)' == 'true' or ('$(TargetsAnyOS)' != 'true' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0')))">true</SuppressDependenciesWhenPacking> |
| 17 | + <SuppressDependenciesWhenPacking Condition="'$(ExcludeFromPackage)' == 'true' or ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetPlatformIdentifier)' != '')">true</SuppressDependenciesWhenPacking> |
18 | 18 | <PackageDesignerMarkerFile>$(MSBuildThisFileDirectory)useSharedDesignerContext.txt</PackageDesignerMarkerFile>
|
19 | 19 | <!-- Generate packages for rid specific projects or for allconfigurations during build. -->
|
20 | 20 | <!-- A package isn't generated if in servicing or in runtimelab. Intended to be overridden at project level. -->
|
|
53 | 53 |
|
54 | 54 | <ItemGroup Condition="'$(AddNETFrameworkAssemblyReferenceToPackage)' == 'true'">
|
55 | 55 | <_FrameworkAssemblyReferences Include="$(MSBuildProjectName)"
|
56 |
| - TargetFramework="net461" /> |
| 56 | + TargetFramework="$(NetFrameworkMinimum)" /> |
57 | 57 | </ItemGroup>
|
58 | 58 |
|
59 | 59 | <Choose>
|
|
63 | 63 | <NoWarn>$(NoWarn);NU5128</NoWarn>
|
64 | 64 | </PropertyGroup>
|
65 | 65 | <ItemGroup Condition="'$(AddNETFrameworkPlaceholderFileToPackage)' == 'true'">
|
66 |
| - <None Include="$(PlaceholderFile)" PackagePath="lib/net461" Pack="true" /> |
67 |
| - <None Include="$(PlaceholderFile)" PackagePath="runtimes/win/lib/net461" Pack="true" Condition="$(TargetFrameworks.Contains('netstandard2.0-windows'))" /> |
| 66 | + <None Include="$(PlaceholderFile)" PackagePath="lib/$(NetFrameworkMinimum)" Pack="true" /> |
| 67 | + <None Include="$(PlaceholderFile)" PackagePath="runtimes/win/lib/$(NetFrameworkMinimum)" Pack="true" Condition="$(TargetFrameworks.Contains('netstandard2.0-windows'))" /> |
68 | 68 | </ItemGroup>
|
69 | 69 | <ItemGroup Condition="'$(AddXamarinPlaceholderFilesToPackage)' == 'true'">
|
70 | 70 | <None Include="$(PlaceholderFile)" PackagePath="lib\MonoAndroid10" Pack="true" />
|
|
153 | 153 | <!-- Include a netstandard compat error if the project targets both .NETStandard and
|
154 | 154 | .NETCoreApp. This prohibits users to consume packages on an older .NETCoreApp version
|
155 | 155 | than the minimum supported one. -->
|
156 |
| - <ItemGroup Condition="'$(DisableNETStandardCompatErrorForNETCoreApp)' != 'true'"> |
| 156 | + <ItemGroup> |
157 | 157 | <NETStandardCompatError Include="netcoreapp2.0"
|
158 | 158 | Supported="$(NetCoreAppMinimum)"
|
159 | 159 | Condition="$(TargetFrameworks.Contains('netstandard2.')) and
|
160 |
| - ($(TargetFrameworks.Contains('$(NetCoreAppMinimum)')) or $(TargetFrameworks.Contains('$(NetCoreAppCurrent)')))" /> |
| 160 | + ($(TargetFrameworks.Contains('$(NetCoreAppMinimum)')) or $(TargetFrameworks.Contains('$(NetCoreAppCurrent)'))) and |
| 161 | + '$(DisableNETStandardCompatErrorForNETCoreApp)' != 'true'" /> |
| 162 | + <NETStandardCompatError Include="net461" |
| 163 | + Supported="$(NetFrameworkMinimum)" |
| 164 | + Condition="$(TargetFrameworks.Contains('netstandard2.0')) and |
| 165 | + ($(TargetFrameworks.Contains('$(NetFrameworkMinimum)')) or $(TargetFrameworks.Contains('net47')) or $(TargetFrameworks.Contains('net48'))) and |
| 166 | + '$(DisableNETStandardCompatErrorForNETFramework)' != 'true'" /> |
| 167 | + |
161 | 168 | </ItemGroup>
|
162 | 169 |
|
163 | 170 | <!-- Add targets file that marks a .NETStandard applicable tfm as unsupported. -->
|
|
0 commit comments