From 0b7e7cec7c0447d6c3f5f33980b5f8d05dc2b158 Mon Sep 17 00:00:00 2001 From: Brice Lambson Date: Tue, 30 Jul 2019 14:52:36 -0700 Subject: [PATCH] Re-introduce INTERNALS_INVISIBLE Fixes #1020 --- EntityFramework.sln | 26 +++- ...mework.SqlServer.InternalsVisibleTo.csproj | 109 ++++++++++++++ .../EntityFramework.SqlServer.csproj | 2 +- .../Properties/InternalsVisibleTo.cs | 4 + ...SqlServerCompact.InternalsVisibleTo.csproj | 95 ++++++++++++ .../EntityFramework.SqlServerCompact.csproj | 2 +- .../Properties/InternalsVisibleTo.cs | 4 + .../EntityFramework.InternalsVisibleTo.csproj | 136 ++++++++++++++++++ src/EntityFramework/EntityFramework.csproj | 1 + .../Properties/InternalsVisibleTo.cs | 8 +- .../FunctionalTests.Transitional.csproj | 4 +- .../FunctionalTests/FunctionalTests.csproj | 4 +- 12 files changed, 384 insertions(+), 11 deletions(-) create mode 100644 src/EntityFramework.SqlServer/EntityFramework.SqlServer.InternalsVisibleTo.csproj create mode 100644 src/EntityFramework.SqlServerCompact/EntityFramework.SqlServerCompact.InternalsVisibleTo.csproj create mode 100644 src/EntityFramework/EntityFramework.InternalsVisibleTo.csproj diff --git a/EntityFramework.sln b/EntityFramework.sln index f5f36cf955..a61be2dabe 100644 --- a/EntityFramework.sln +++ b/EntityFramework.sln @@ -33,7 +33,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionalTests.ProviderAgn EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Entity.Build.Tasks", "src\Microsoft.Data.Entity.Build.Tasks\Microsoft.Data.Entity.Build.Tasks.csproj", "{B8DB9CC0-822A-423C-A5BE-28C19F94899B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ef6", "src\ef6\ef6.csproj", "{7F79B619-FA4D-46D7-876E-FD06C22465DB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ef6", "src\ef6\ef6.csproj", "{7F79B619-FA4D-46D7-876E-FD06C22465DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework.InternalsVisibleTo", "src\EntityFramework\EntityFramework.InternalsVisibleTo.csproj", "{A883C5CA-53F5-41FA-9123-728F94CC6599}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "InternalsVisibleTo", "InternalsVisibleTo", "{A92C22F0-200B-4C61-8544-0EAE620B8006}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework.SqlServer.InternalsVisibleTo", "src\EntityFramework.SqlServer\EntityFramework.SqlServer.InternalsVisibleTo.csproj", "{63368BF7-E04A-4F0E-ACE7-3CC6DE7F3E93}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework.SqlServerCompact.InternalsVisibleTo", "src\EntityFramework.SqlServerCompact\EntityFramework.SqlServerCompact.InternalsVisibleTo.csproj", "{0E08516E-89A5-4C72-BBE2-59AFCD4EF55D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -85,6 +93,18 @@ Global {7F79B619-FA4D-46D7-876E-FD06C22465DB}.Debug|Any CPU.Build.0 = Debug|Any CPU {7F79B619-FA4D-46D7-876E-FD06C22465DB}.Release|Any CPU.ActiveCfg = Release|Any CPU {7F79B619-FA4D-46D7-876E-FD06C22465DB}.Release|Any CPU.Build.0 = Release|Any CPU + {A883C5CA-53F5-41FA-9123-728F94CC6599}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A883C5CA-53F5-41FA-9123-728F94CC6599}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A883C5CA-53F5-41FA-9123-728F94CC6599}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A883C5CA-53F5-41FA-9123-728F94CC6599}.Release|Any CPU.Build.0 = Release|Any CPU + {63368BF7-E04A-4F0E-ACE7-3CC6DE7F3E93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63368BF7-E04A-4F0E-ACE7-3CC6DE7F3E93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63368BF7-E04A-4F0E-ACE7-3CC6DE7F3E93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63368BF7-E04A-4F0E-ACE7-3CC6DE7F3E93}.Release|Any CPU.Build.0 = Release|Any CPU + {0E08516E-89A5-4C72-BBE2-59AFCD4EF55D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E08516E-89A5-4C72-BBE2-59AFCD4EF55D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E08516E-89A5-4C72-BBE2-59AFCD4EF55D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E08516E-89A5-4C72-BBE2-59AFCD4EF55D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -96,6 +116,10 @@ Global {CF1C27F8-D603-4960-BE99-BCF348545368} = {24A9C4D1-E189-4D3A-A2D7-36D3ED51D277} {3D65611F-E8FB-4A33-9196-7836969D6378} = {24A9C4D1-E189-4D3A-A2D7-36D3ED51D277} {C0B5124C-0133-4E0B-BF36-A32CE5AD9DAA} = {24A9C4D1-E189-4D3A-A2D7-36D3ED51D277} + {A883C5CA-53F5-41FA-9123-728F94CC6599} = {A92C22F0-200B-4C61-8544-0EAE620B8006} + {A92C22F0-200B-4C61-8544-0EAE620B8006} = {24A9C4D1-E189-4D3A-A2D7-36D3ED51D277} + {63368BF7-E04A-4F0E-ACE7-3CC6DE7F3E93} = {A92C22F0-200B-4C61-8544-0EAE620B8006} + {0E08516E-89A5-4C72-BBE2-59AFCD4EF55D} = {A92C22F0-200B-4C61-8544-0EAE620B8006} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D7045317-2675-4853-926A-4D4354176EEE} diff --git a/src/EntityFramework.SqlServer/EntityFramework.SqlServer.InternalsVisibleTo.csproj b/src/EntityFramework.SqlServer/EntityFramework.SqlServer.InternalsVisibleTo.csproj new file mode 100644 index 0000000000..36c1125192 --- /dev/null +++ b/src/EntityFramework.SqlServer/EntityFramework.SqlServer.InternalsVisibleTo.csproj @@ -0,0 +1,109 @@ + + + + EntityFramework.SqlServer + System.Data.Entity.SqlServer + net45;netstandard2.1 + 6.0.0.0 + $(DefineConstants);SQLSERVER + + + + + + + + + Utilities\TaskExtensions.cs + + + Properties\SharedAssemblyInfo.cs + + + Properties\SharedAssemblyVersionInfo.cs + + + Utilities\ByteExtensions.cs + + + Utilities\TypeExtensions.cs + + + Utilities\PropertyInfo.cs + + + Utilities\Check.cs + + + Utilities\DatabaseName.cs + + + Utilities\DebugCheck.cs + + + Utilities\IEnumerableExtensions.cs + + + Utilities\StringExtensions.cs + + + + + + True + True + Resources.SqlServer.tt + + + + + + TextTemplatingFileGenerator + Resources.SqlServer.cs + System.Data.Entity.SqlServer + + + + + + + + + + + + + + + + System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinition.ssdl + + + System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinitionVersion3.ssdl + + + System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinitionVersion3_Sql8.ssdl + + + System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinition_Sql8.ssdl + + + System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMapping.msl + + + System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMappingVersion3.msl + + + System.Data.Resources.SqlClient.SqlProviderServices.ProviderManifest.xml + + + + + + + + + + + + diff --git a/src/EntityFramework.SqlServer/EntityFramework.SqlServer.csproj b/src/EntityFramework.SqlServer/EntityFramework.SqlServer.csproj index d6b6cf8acc..7a141230c5 100644 --- a/src/EntityFramework.SqlServer/EntityFramework.SqlServer.csproj +++ b/src/EntityFramework.SqlServer/EntityFramework.SqlServer.csproj @@ -6,7 +6,7 @@ net45;net40;netstandard2.1 EntityFramework.SqlServer.dll 6.0.0.0 - $(DefineConstants);SQLSERVER + $(DefineConstants);SQLSERVER;INTERNALS_INVISIBLE diff --git a/src/EntityFramework.SqlServer/Properties/InternalsVisibleTo.cs b/src/EntityFramework.SqlServer/Properties/InternalsVisibleTo.cs index 14223948bf..d72ac585e1 100644 --- a/src/EntityFramework.SqlServer/Properties/InternalsVisibleTo.cs +++ b/src/EntityFramework.SqlServer/Properties/InternalsVisibleTo.cs @@ -1,5 +1,7 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. +#if !INTERNALS_INVISIBLE + using System.Runtime.CompilerServices; [assembly: @@ -17,3 +19,5 @@ InternalsVisibleTo( "DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" )] + +#endif diff --git a/src/EntityFramework.SqlServerCompact/EntityFramework.SqlServerCompact.InternalsVisibleTo.csproj b/src/EntityFramework.SqlServerCompact/EntityFramework.SqlServerCompact.InternalsVisibleTo.csproj new file mode 100644 index 0000000000..c458451811 --- /dev/null +++ b/src/EntityFramework.SqlServerCompact/EntityFramework.SqlServerCompact.InternalsVisibleTo.csproj @@ -0,0 +1,95 @@ + + + + EntityFramework.SqlServerCompact + System.Data.Entity.SqlServerCompact + net45 + 6.0.0.0 + $(DefineConstants);SQLSERVERCOMPACT + + + + + + + + + + + + + + Properties\SharedAssemblyInfo.cs + + + Properties\SharedAssemblyVersionInfo.cs + + + Utilities\ByteExtensions.cs + + + Utilities\Check.cs + + + Utilities\DatabaseName.cs + + + Utilities\DebugCheck.cs + + + Utilities\IEnumerableExtensions.cs + + + Utilities\StringExtensions.cs + + + + + + Resources.SqlServerCompact.tt + True + + + Component + + + + + + TextTemplatingFileGenerator + Resources.SqlServerCompact.cs + System.Data.Entity.SqlServerCompact + + + + + + + + + + + + + Microsoft.SqlServerCe.Client.Resources.Entity.SqlCeProviderServices.StoreSchemaDefinition.ssdl + + + System.Data.Resources.SqlServerCe.Entity.SqlCeProviderServices.ProviderManifest.xml + + + System.Data.Resources.SqlServerCe.Entity.SqlCeProviderServices.StoreSchemaDefinition.ssdl + + + System.Data.Resources.SqlServerCe.Entity.SqlCeProviderServices.StoreSchemaMapping.msl + + + + + + + + + + + + diff --git a/src/EntityFramework.SqlServerCompact/EntityFramework.SqlServerCompact.csproj b/src/EntityFramework.SqlServerCompact/EntityFramework.SqlServerCompact.csproj index 221916ec4b..cec3e309b0 100644 --- a/src/EntityFramework.SqlServerCompact/EntityFramework.SqlServerCompact.csproj +++ b/src/EntityFramework.SqlServerCompact/EntityFramework.SqlServerCompact.csproj @@ -6,7 +6,7 @@ net45;net40 Allows SQL Server Compact 4.0 to be used with Entity Framework. 6.0.0.0 - $(DefineConstants);SQLSERVERCOMPACT + $(DefineConstants);SQLSERVERCOMPACT;INTERNALS_INVISIBLE True $(PackageTags);SQL Compact;CE $(MSBuildThisFileDirectory)$(MSBuildProjectName).nuspec diff --git a/src/EntityFramework.SqlServerCompact/Properties/InternalsVisibleTo.cs b/src/EntityFramework.SqlServerCompact/Properties/InternalsVisibleTo.cs index 14223948bf..d72ac585e1 100644 --- a/src/EntityFramework.SqlServerCompact/Properties/InternalsVisibleTo.cs +++ b/src/EntityFramework.SqlServerCompact/Properties/InternalsVisibleTo.cs @@ -1,5 +1,7 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. +#if !INTERNALS_INVISIBLE + using System.Runtime.CompilerServices; [assembly: @@ -17,3 +19,5 @@ InternalsVisibleTo( "DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" )] + +#endif diff --git a/src/EntityFramework/EntityFramework.InternalsVisibleTo.csproj b/src/EntityFramework/EntityFramework.InternalsVisibleTo.csproj new file mode 100644 index 0000000000..687105bc2c --- /dev/null +++ b/src/EntityFramework/EntityFramework.InternalsVisibleTo.csproj @@ -0,0 +1,136 @@ + + + + EntityFramework + System.Data.Entity + net45;netstandard2.1 + 6.0.0.0 + + + + + + + + + + + + + + + + + + + + Properties\SharedAssemblyInfo.cs + + + Properties\SharedAssemblyVersionInfo.cs + + + Utilities\%(Filename).cs + + + + + + Component + + + Component + + + Component + + + True + True + Resources.tt + + + + + + TextTemplatingFileGenerator + Resources.cs + System.Data.Entity + + + + + + + + + + + + + + + + + + + + + + + + + System.Data.Resources.AnnotationSchema.xsd + + + System.Data.Resources.CodeGenerationSchema.xsd + + + System.Data.Resources.CSDLSchema_1.xsd + + + System.Data.Resources.CSDLSchema_1_1.xsd + + + System.Data.Resources.CSDLSchema_2.xsd + + + System.Data.Resources.CSDLSchema_3.xsd + + + System.Data.Resources.EntityStoreSchemaGenerator.xsd + + + System.Data.Resources.SSDLSchema.xsd + + + System.Data.Resources.SSDLSchema_2.xsd + + + System.Data.Resources.SSDLSchema_3.xsd + + + System.Data.Resources.CSMSL_1.xsd + + + System.Data.Resources.CSMSL_2.xsd + + + System.Data.Resources.CSMSL_3.xsd + + + System.Data.Resources.DbProviderServices.ConceptualSchemaDefinition.csdl + + + System.Data.Resources.DbProviderServices.ConceptualSchemaDefinitionVersion3.csdl + + + System.Data.Resources.ProviderServices.ProviderManifest.xsd + + + + + + + + diff --git a/src/EntityFramework/EntityFramework.csproj b/src/EntityFramework/EntityFramework.csproj index 479e7e3fe9..0a44a0bbb3 100644 --- a/src/EntityFramework/EntityFramework.csproj +++ b/src/EntityFramework/EntityFramework.csproj @@ -6,6 +6,7 @@ net45;net40;netstandard2.1 EntityFramework.dll 6.0.0.0 + $(DefineConstants);INTERNALS_INVISIBLE diff --git a/src/EntityFramework/Properties/InternalsVisibleTo.cs b/src/EntityFramework/Properties/InternalsVisibleTo.cs index dadc8496f7..faebcd8064 100644 --- a/src/EntityFramework/Properties/InternalsVisibleTo.cs +++ b/src/EntityFramework/Properties/InternalsVisibleTo.cs @@ -7,6 +7,8 @@ "Microsoft.Data.Entity.Design.VersioningFacade, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293" )] +#if !INTERNALS_INVISIBLE + [assembly: InternalsVisibleTo( "EntityFramework.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293" @@ -15,10 +17,6 @@ InternalsVisibleTo( "EntityFramework.FunctionalTests.Transitional, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293" )] -[assembly: - InternalsVisibleTo( - "EntityFramework.FunctionalTests.netcoreapp3.0, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293" - )] [assembly: InternalsVisibleTo( "EFDesigner.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293" @@ -30,3 +28,5 @@ InternalsVisibleTo( "DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" )] + +#endif diff --git a/test/EntityFramework/FunctionalTests.Transitional/FunctionalTests.Transitional.csproj b/test/EntityFramework/FunctionalTests.Transitional/FunctionalTests.Transitional.csproj index 7964ea2a0d..209a58012f 100644 --- a/test/EntityFramework/FunctionalTests.Transitional/FunctionalTests.Transitional.csproj +++ b/test/EntityFramework/FunctionalTests.Transitional/FunctionalTests.Transitional.csproj @@ -26,11 +26,11 @@ - + - + diff --git a/test/EntityFramework/FunctionalTests/FunctionalTests.csproj b/test/EntityFramework/FunctionalTests/FunctionalTests.csproj index f1572cb966..2114b0d480 100644 --- a/test/EntityFramework/FunctionalTests/FunctionalTests.csproj +++ b/test/EntityFramework/FunctionalTests/FunctionalTests.csproj @@ -17,11 +17,11 @@ - + - +