Skip to content

Commit 400a989

Browse files
authored
Adopt consistent approach for defining InternalsVisibleTo in the repo (#45748)
1 parent 2764b94 commit 400a989

File tree

166 files changed

+435
-649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+435
-649
lines changed

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,9 @@
254254
<Import Project="eng\targets\Java.Common.props" Condition="'$(MSBuildProjectExtension)' == '.javaproj'" />
255255
<Import Project="eng\targets\Helix.props" Condition=" $(IsTestProject) " />
256256
<Import Project="eng\targets\FunctionalTestWithAssets.props" Condition=" $(IsTestProject) " />
257+
258+
<!-- Keys used by InternalsVisibleTo attributes. -->
259+
<PropertyGroup>
260+
<MoqPublicKey>0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</MoqPublicKey>
261+
</PropertyGroup>
257262
</Project>

src/Analyzers/Analyzers/src/Microsoft.AspNetCore.Analyzers.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@
2727
<NuspecProperty Include="OutputSymbol=$(OutputPath)$(AssemblyName).pdb" />
2828
</ItemGroup>
2929

30+
<ItemGroup>
31+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Analyzers.Test" />
32+
</ItemGroup>
3033
</Project>

src/Analyzers/Analyzers/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@
1818
<Reference Include="Microsoft.Extensions.ObjectPool" />
1919
</ItemGroup>
2020

21+
<ItemGroup>
22+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="$(MoqPublicKey)" />
23+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Antiforgery.Test" />
24+
</ItemGroup>
2125
</Project>

src/Antiforgery/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/Azure/AzureAppServices.HostingStartup/src/AssemblyInfo.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@
1515
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
1616
</ItemGroup>
1717

18+
<ItemGroup>
19+
<InternalsVisibleTo Include="Microsoft.AspNetCore.AzureAppServicesIntegration.Tests" />
20+
</ItemGroup>
1821
</Project>

src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@
1414
<Reference Include="Microsoft.Extensions.Logging.AzureAppServices" />
1515
</ItemGroup>
1616

17+
<ItemGroup>
18+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Hosting.Azure.AppServices.Tests" />
19+
</ItemGroup>
1720
</Project>

src/Azure/AzureAppServicesIntegration/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Components/Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@
2020
<None Include="buildTransitive/netstandard2.0/*" Pack="true" PackagePath="buildTransitive/netstandard2.0" />
2121
</ItemGroup>
2222

23+
<ItemGroup>
24+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Analyzers.Tests" />
25+
</ItemGroup>
2326
</Project>

src/Components/Analyzers/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Components/Components/src/Microsoft.AspNetCore.Components.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,17 @@
6666
<NuspecProperty Include="PackageThirdPartyNoticesFile=$(PackageThirdPartyNoticesFile)" />
6767
</ItemGroup>
6868

69+
<ItemGroup>
70+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Web" />
71+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Blazor.Build.Tests" />
72+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Authorization.Tests" />
73+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Forms.Tests" />
74+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Performance" />
75+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Server.Tests" />
76+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Tests" />
77+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Web.Tests" />
78+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.ProtectedBrowserStorage.Tests" />
79+
<InternalsVisibleTo Include="Components.TestServer" />
80+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="$(MoqPublicKey)" />
81+
</ItemGroup>
6982
</Project>

src/Components/Components/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,10 @@
118118
<EmbeddedResource Include="$(BlazorServerJSFile).map" LogicalName="_framework/$(BlazorServerJSFilename).map" Condition="Exists('$(BlazorServerJSFile).map')" />
119119
</ItemGroup>
120120
</Target>
121+
122+
<ItemGroup>
123+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Blazor.DevServer" />
124+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Server.Tests" />
125+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="$(MoqPublicKey)" />
126+
</ItemGroup>
121127
</Project>

src/Components/Server/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@
1818
<Reference Include="System.IO.Pipelines" />
1919
</ItemGroup>
2020

21+
<ItemGroup>
22+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Server.Tests" />
23+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Components.Web.Tests" />
24+
</ItemGroup>
2125
</Project>

src/Components/Web/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/Components/WebAssembly/WebAssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,7 @@
8888

8989
<Import Project="Sdk.targets" Sdk="Yarn.MSBuild" Condition=" '$(DotNetBuildFromSource)' != 'true'" />
9090

91+
<ItemGroup>
92+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Blazor.Tests" />
93+
</ItemGroup>
9194
</Project>

src/Components/WebAssembly/WebAssembly.Authentication/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Components/WebAssembly/WebAssembly/src/Microsoft.AspNetCore.Components.WebAssembly.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,8 @@
6363
<Target Name="_CheckBlazorServerJSPath" BeforeTargets="GenerateNuspec" DependsOnTargets="ResolveProjectReferences" Condition=" '$(IsPackable)' == 'true' ">
6464
<Error Text="'$(BlazorWebAssemblyJSFile)' does not exist. Enable NodeJS to pack this project." Condition=" !EXISTS('$(BlazorWebAssemblyJSFile)') " />
6565
</Target>
66+
67+
<ItemGroup>
68+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="$(MoqPublicKey)" />
69+
</ItemGroup>
6670
</Project>

src/Components/WebAssembly/WebAssembly/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<Description>ASP.NET Core data protection abstractions.
@@ -20,4 +20,7 @@ Microsoft.AspNetCore.DataProtection.IDataProtector</Description>
2020
Condition="'$(TargetFramework)' != '$(DefaultNetCoreTargetFramework)'" />
2121
</ItemGroup>
2222

23+
<ItemGroup>
24+
<InternalsVisibleTo Include="Microsoft.AspNetCore.DataProtection.Abstractions.Tests" />
25+
</ItemGroup>
2326
</Project>

src/DataProtection/Abstractions/src/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/DataProtection/Cryptography.Internal/src/Microsoft.AspNetCore.Cryptography.Internal.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,13 @@
1010
<IsTrimmable>true</IsTrimmable>
1111
</PropertyGroup>
1212

13+
<ItemGroup>
14+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Cryptography.Internal.Tests" />
15+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" />
16+
<InternalsVisibleTo Include="Microsoft.AspNetCore.Cryptography.KeyDerivation.Tests" />
17+
<InternalsVisibleTo Include="Microsoft.AspNetCore.DataProtection" />
18+
<InternalsVisibleTo Include="Microsoft.AspNetCore.DataProtection.Abstractions.Tests" />
19+
<InternalsVisibleTo Include="Microsoft.AspNetCore.DataProtection.Extensions.Tests" />
20+
<InternalsVisibleTo Include="Microsoft.AspNetCore.DataProtection.Tests" />
21+
</ItemGroup>
1322
</Project>

0 commit comments

Comments
 (0)