Skip to content

Commit

Permalink
Add fake assemblies for out-of-band type forward destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer committed Jul 17, 2023
1 parent 71a3209 commit cf755a3
Show file tree
Hide file tree
Showing 43 changed files with 1,226 additions and 89 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum)</TargetFrameworks>
<SkipValidateReferenceAssemblyProjectReferences>true</SkipValidateReferenceAssemblyProjectReferences>
</PropertyGroup>

<ItemGroup>
Expand All @@ -9,7 +11,8 @@
</ItemGroup>

<ItemGroup>
<!-- Avoid a PackageReference to System.Drawing.Common this reference is only needed for TypeForwards -->
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)" PrivateAssets="All" />
<!-- Avoid a product dependency to System.Drawing.Common, this reference is only needed for TypeForwards -->
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Drawing.Common.csproj" PrivateAssets="all" />
</ItemGroup>

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

<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down Expand Up @@ -93,7 +94,8 @@ System.Security.Cryptography.X509Certificates.X509SelectionFlag</PackageDescript
</ItemGroup>

<ItemGroup>
<!-- Avoid a PackageReference to System.Drawing.Common this reference is only needed for TypeForwards -->
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)" PrivateAssets="All" />
<!-- Avoid a product dependency to System.Drawing.Common, this reference is only needed for TypeForwards -->
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Drawing.Common.csproj" PrivateAssets="all" />
</ItemGroup>

</Project>
5 changes: 0 additions & 5 deletions src/libraries/shims/Directory.Build.targets

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Configuration.ConfigurationManager.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Permissions.csproj" />
</ItemGroup>

</Project>
9 changes: 4 additions & 5 deletions src/libraries/shims/System.Core/src/System.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.PerformanceCounter\src\System.Diagnostics.PerformanceCounter.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.MemoryMappedFiles\src\System.IO.MemoryMappedFiles.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Pipes\src\System.IO.Pipes.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Pipes.AccessControl\src\System.IO.Pipes.AccessControl.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Linq\src\System.Linq.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Pipes\src\System.IO.Pipes.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Linq.Expressions\src\System.Linq.Expressions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Linq.Parallel\src\System.Linq.Parallel.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Linq.Queryable\src\System.Linq.Queryable.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Linq\src\System.Linq.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography\src\System.Security.Cryptography.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Diagnostics.PerformanceCounter.csproj" />
</ItemGroup>

</Project>
10 changes: 0 additions & 10 deletions src/libraries/shims/System.Data/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
<PropertyGroup>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<StrongNameKeyId>ECMA</StrongNameKeyId>
<SystemDataSqlClientTFM>netcoreapp2.1</SystemDataSqlClientTFM>
<!-- Keep in sync with TFM exposed in source-build-reference-packages/src/referencePackages/src/system.data.sqlclient/4.8.5 -->
<SystemDataSqlClientTFM Condition="'$(ArcadeBuildFromSource)' == 'true'">net6.0</SystemDataSqlClientTFM>
</PropertyGroup>

<ItemGroup>
<!-- System.Data.SqlClient is not live built anymore, reference it manually to avoid tfm nuget selection fallback errors
when the TargetOS i.e. is MacCatalyst. Set Private false so that it doesn't flow down to consuming projects. -->
<PackageDownload Include="System.Data.SqlClient" Version="[$(SystemDataSqlClientVersion)]" />
<Reference Include="$([MSBuild]::NormalizePath('$(NuGetPackageRoot)', 'system.data.sqlclient', '$(SystemDataSqlClientVersion)', 'ref', '$(SystemDataSqlClientTFM)', 'System.Data.SqlClient.dll'))" Private="false" />
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions src/libraries/shims/System.Data/ref/System.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Data.Common\ref\System.Data.Common.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Data.Odbc\ref\System.Data.Odbc.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Data.OleDb\ref\System.Data.OleDb.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\ref\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Data.Odbc.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Data.OleDb.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Data.SqlClient.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Permissions.csproj" />
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions src/libraries/shims/System.Data/src/System.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
<ItemGroup>
<ProjectReference Include="$(CoreLibProject)" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Data.Common\src\System.Data.Common.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Data.Odbc\src\System.Data.Odbc.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Data.OleDb\src\System.Data.OleDb.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Data.Odbc.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Data.OleDb.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Data.SqlClient.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Permissions.csproj" />
</ItemGroup>

</Project>
11 changes: 3 additions & 8 deletions src/libraries/shims/System.Drawing/src/System.Drawing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.ComponentModel.TypeConverter\src\System.ComponentModel.TypeConverter.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Drawing.Primitives\src\System.Drawing.Primitives.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
</ItemGroup>

<ItemGroup>
<!-- Use PackageDownload to not bring in System.Drawing.Common's dependencies (Microsoft.Win32.SystemEvents). -->
<PackageDownload Include="System.Drawing.Common" Version="[$(SystemDrawingCommonVersion)]" />
<Reference Include="$([MSBuild]::NormalizePath('$(NuGetPackageRoot)', 'system.drawing.common', '$(SystemDrawingCommonVersion)', 'lib', 'net7.0', 'System.Drawing.Common.dll'))" Private="false" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Configuration.ConfigurationManager.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Drawing.Common.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Permissions.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/libraries/shims/System.Net/src/System.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ProjectReference Include="$(LibrariesProjectRoot)System.Net.WebClient\src\System.Net.WebClient.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Net.WebHeaderCollection\src\System.Net.WebHeaderCollection.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Permissions.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Serialization.Json\src\System.Runtime.Serialization.Json.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Serialization.Primitives\src\System.Runtime.Serialization.Primitives.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Serialization.Schema\src\System.Runtime.Serialization.Schema.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Serialization.Xml\src\System.Runtime.Serialization.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Runtime.Serialization.Schema.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Pkcs\src\System.Security.Cryptography.Pkcs.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Xml\src\System.Security.Cryptography.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Cryptography.Pkcs.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Cryptography.ProtectedData.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Cryptography.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Windows.Extensions.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Serialization.Json\src\System.Runtime.Serialization.Json.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.ServiceModel.Syndication\src\System.ServiceModel.Syndication.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.ServiceModel.Syndication.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.ServiceProcess.ServiceController\src\System.ServiceProcess.ServiceController.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.ServiceProcess.ServiceController.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Transactions.Local\src\System.Transactions.Local.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)shims\fakes\System.Security.Permissions.csproj" />
</ItemGroup>

</Project>
Loading

0 comments on commit cf755a3

Please sign in to comment.