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

Enable the option to invoke APICompat in strict mode for ref-pack servicing #88707

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 9 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@
<MicrosoftNetCoreAppFrameworkName>Microsoft.NETCore.App</MicrosoftNetCoreAppFrameworkName>
<NetCoreAppCurrentBrandName>.NET $(NetCoreAppCurrentVersion)</NetCoreAppCurrentBrandName>
<NetCoreAppCurrent>net$(NetCoreAppCurrentVersion)</NetCoreAppCurrent>
<!-- Important: Set this to the GA version during servicing when GA packages are available. -->
<ApiCompatNetCoreAppBaselineVersion>7.0</ApiCompatNetCoreAppBaselineVersion>

<!-- The previous supported .NET version. -->
<NetCoreAppPreviousVersion>7.0</NetCoreAppPreviousVersion>
<NetCoreAppPrevious>net$(NetCoreAppPreviousVersion)</NetCoreAppPrevious>
<NetCoreAppPrevious Condition="'$(DotNetBuildFromSource)' == 'true'">$(NetCoreAppCurrent)</NetCoreAppPrevious>
<NetCoreAppPreviousPackageBaselineVersion>$(NetCoreAppPreviousVersion).0</NetCoreAppPreviousPackageBaselineVersion>

<!-- The minimum supported .NET version. -->
<NetCoreAppMinimum>net6.0</NetCoreAppMinimum>
Expand Down Expand Up @@ -349,6 +350,13 @@
<PlaceholderFile>$(RepositoryEngineeringDir)_._</PlaceholderFile>
</PropertyGroup>

<!-- Flow these properties to consuming projects. -->
<ItemDefinitionGroup>
<TargetPathWithTargetPlatformMoniker>
<IsPrivateAssembly>$(IsPrivateAssembly.ToLowerInvariant())</IsPrivateAssembly>
</TargetPathWithTargetPlatformMoniker>
</ItemDefinitionGroup>

<!-- Language configuration -->
<PropertyGroup>
<!-- default to allowing all language features -->
Expand Down
2 changes: 1 addition & 1 deletion eng/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<DisablePackageBaselineValidation Condition="'$(IsShipping)' == 'false' or
'$(SuppressFinalPackageVersion)' == 'true' or
'$(DotNetBuildFromSource)' == 'true'">true</DisablePackageBaselineValidation>
<PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$(NetCoreAppPreviousPackageBaselineVersion)</PackageValidationBaselineVersion>
<PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$(ApiCompatNetCoreAppBaselineVersion).0</PackageValidationBaselineVersion>
<BeforePack>$(BeforePack);IncludeAnalyzersInPackage;AddNETStandardCompatErrorFileForPackaging</BeforePack>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddRuntimeSpecificFilesToPackage;IncludeProjectReferencesWithPackAttributeInPackage</TargetsForTfmSpecificContentInPackage>
<!-- Don't include target platform specific dependencies, since we use the target platform to represent RIDs instead -->
Expand Down
10 changes: 0 additions & 10 deletions eng/references.targets
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@
</ItemGroup>
</Target>

<!-- An opt-in target to trim out private assemblies from the ref assembly ReferencePath. -->
<Target Name="TrimOutPrivateAssembliesFromReferencePath"
Condition="'$(CompileUsingReferenceAssemblies)' == 'true' and '$(TrimOutPrivateAssembliesFromReferencePath)' == 'true'"
AfterTargets="FindReferenceAssembliesForReferences">
<ItemGroup>
<ReferencePathWithRefAssemblies Remove="@(ReferencePathWithRefAssemblies)"
Condition="$(NetCoreAppLibraryNoReference.Contains('%(Filename);'))" />
</ItemGroup>
</Target>

<Target Name="ReplaceCoreLibSrcWithRefAssemblyForCompilation"
AfterTargets="FindReferenceAssembliesForReferences"
Condition="'$(CompileUsingReferenceAssemblies)' != 'true' and '@(_coreLibProjectReference)' != ''">
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
$(NetCoreAppLibrary.Contains('$(AssemblyName);'))">true</IsNETCoreAppSrc>
<IsNETCoreAppRef Condition="('$(IsReferenceAssemblyProject)' == 'true' or '$(IsRuntimeAndReferenceAssembly)' == 'true') and
$(NetCoreAppLibrary.Contains('$(AssemblyName);')) and
!$(NetCoreAppLibraryNoReference.Contains('$(AssemblyName);'))">true</IsNETCoreAppRef>
'$(IsPrivateAssembly)' != 'true'">true</IsNETCoreAppRef>
<IsNETCoreAppAnalyzer Condition="'$(IsGeneratorProject)' == 'true' and
$(NetCoreAppLibraryGenerator.Contains('$(MSBuildProjectName);'))">true</IsNETCoreAppAnalyzer>
<!-- Inbox analyzers shouldn't use the live targeting / runtime pack. They better depend on an LKG to avoid layering concerns. -->
Expand Down
8 changes: 0 additions & 8 deletions src/libraries/NetCoreAppLibrary.props
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,6 @@
System.Xml.XPath;
System.Xml.XPath.XDocument;
</NetCoreAppLibrary>
<NetCoreAppLibraryNoReference>
System.Private.CoreLib;
System.Private.DataContractSerialization;
System.Private.Uri;
System.Private.Xml;
System.Private.Xml.Linq;
</NetCoreAppLibraryNoReference>
<!-- List .NETCoreApp shared framework generator project names below. -->
<NetCoreAppLibraryGenerator>
ComInterfaceGenerator;
Expand Down Expand Up @@ -252,7 +245,6 @@
<ItemGroup>
<NetFxReference Include="$(NetFxReference)" />
<NetCoreAppLibrary Include="$(NetCoreAppLibrary)" />
<NetCoreAppLibraryNoReference Include="$(NetCoreAppLibraryNoReference)" />
<NetCoreAppLibraryGenerator Include="$(NetCoreAppLibraryGenerator)" />
<AspNetCoreAppLibrary Include="$(AspNetCoreAppLibrary)" />
<WindowsDesktopCoreAppLibrary Include="$(WindowsDesktopCoreAppLibrary)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
<ProjectReference Include="..\..\System.Collections.NonGeneric\src\System.Collections.NonGeneric.csproj" />
<ProjectReference Include="..\..\System.ComponentModel.TypeConverter\src\System.ComponentModel.TypeConverter.csproj" />
<ProjectReference Include="..\..\System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Private.Uri\src\System.Private.Uri.csproj" />
<ProjectReference Include="..\..\System.Private.Uri\src\System.Private.Uri.csproj" PrivateAssets="all" />
<Reference Include="System.Collections.Concurrent" />
<Reference Include="System.ComponentModel" />
<Reference Include="System.ComponentModel.Primitives" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamespace>System.Xml</RootNamespace>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<RootNamespace>System.Xml</RootNamespace>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(CommonPath)System\Collections\Generic\EnumerableHelpers.cs"
Link="Common\System\Collections\Generic\EnumerableHelpers.cs" />
Expand Down Expand Up @@ -40,14 +42,16 @@
<Compile Include="System\Xml\XPath\XNodeNavigator.cs" />
<Compile Include="System\Xml\XPath\XObjectExtensions.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" PrivateAssets="all" />
<Reference Include="System.Collections" />
<Reference Include="System.Linq" />
<Reference Include="System.Memory" />
<Reference Include="System.ObjectModel" />
<Reference Include="System.Runtime" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Thread" />
<Reference Include="System.Memory" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(CoreLibProject)" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Uri\src\System.Private.Uri.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Uri\src\System.Private.Uri.csproj" PrivateAssets="all" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" PrivateAssets="all"/>
<Reference Include="System.Runtime" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" PrivateAssets="all"/>
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Serialization.Primitives" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<RootNamespace>System.Xml</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" PrivateAssets="all" />
<Reference Include="System.Runtime" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<RootNamespace>System.Xml</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml.Linq\src\System.Private.Xml.Linq.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml.Linq\src\System.Private.Xml.Linq.csproj" PrivateAssets="all" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" PrivateAssets="all"/>
<Reference Include="System.Runtime" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="System\Xml\XPath\XDocumentExtensions.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml.Linq\src\System.Private.Xml.Linq.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" PrivateAssets="all" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml.Linq\src\System.Private.Xml.Linq.csproj" PrivateAssets="all" />
<Reference Include="System.Runtime" />
</ItemGroup>

</Project>
7 changes: 5 additions & 2 deletions src/libraries/System.Xml.XPath/src/System.Xml.XPath.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" PrivateAssets="all" />
<Reference Include="System.Runtime" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" PrivateAssets="all" />
<Reference Include="System.Runtime" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Xml\src\System.Private.Xml.csproj" PrivateAssets="all"/>
<Reference Include="System.Runtime" />
</ItemGroup>

</Project>
Loading