Skip to content

Commit ab49fd5

Browse files
committed
Change property from InternalsAssemblyName to IgnoresAccessChecksTo
1 parent a47ca91 commit ab49fd5

File tree

5 files changed

+25
-17
lines changed

5 files changed

+25
-17
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Just add the package and define `InternalsAssemblyName` items with the assemblie
1414
<Project Sdk="Microsoft.NET.Sdk">
1515

1616
<ItemGroup>
17-
<InternalsAssemblyName Include="AssemblyToGrantAccessTo1" />
18-
<InternalsAssemblyName Include="AssemblyToGrantAccessTo2" />
19-
<InternalsAssemblyExcludeTypeName Include="Namespace.TypeName" />
17+
<IgnoresAccessChecksTo Include="AssemblyToGrantAccessTo1" />
18+
<IgnoresAccessChecksTo Include="AssemblyToGrantAccessTo2" />
19+
<IgnoresAccessChecksToExcludeTypeName Include="Namespace.TypeName" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

src/IgnoresAccessChecksToGenerator.Tasks/IgnoresAccessChecksToGenerator.Tasks.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
55
<LangVersion>latest</LangVersion>
66
<PackageId>IgnoresAccessChecksToGenerator</PackageId>
7-
<Version>0.7.1</Version>
7+
<Version>0.8.0</Version>
88
<DevelopmentDependency>true</DevelopmentDependency>
99
<Authors>Eli Arbel</Authors>
1010
<RepositoryUrl>https://github.com/aelij/IgnoresAccessChecksToGenerator</RepositoryUrl>
@@ -21,8 +21,8 @@
2121
</ItemGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="Mono.Cecil" Version="0.11.5" />
25-
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.8.3" />
24+
<PackageReference Include="Mono.Cecil" Version="0.11.6" />
25+
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.12.6" />
2626
</ItemGroup>
2727

2828
<Target Name="IncludePackageDependencies">

src/IgnoresAccessChecksToGenerator.Tasks/build/IgnoresAccessChecksToGenerator.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
<InternalsAssemblyExcludeTypeName>
88
<Visible>false</Visible>
99
</InternalsAssemblyExcludeTypeName>
10+
<IgnoresAccessChecksTo>
11+
<Visible>false</Visible>
12+
</IgnoresAccessChecksTo>
13+
<IgnoresAccessChecksToExcludeTypeName>
14+
<Visible>false</Visible>
15+
</IgnoresAccessChecksToExcludeTypeName>
1016
</ItemDefinitionGroup>
1117

1218
</Project>

src/IgnoresAccessChecksToGenerator.Tasks/build/IgnoresAccessChecksToGenerator.targets

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,20 @@
2020
Outputs="$(_IACTG_ManifestFilePath)"
2121
Returns="@(_IACTG_InputReferencePath);@(_IACTG_OutputReferencePath)">
2222
<ItemGroup>
23-
<InternalsAssemblyName Include="$(InternalsAssemblyNames.Split(;))" />
24-
<InternalsAssemblyExcludeTypeName Include="$(InternalsAssemblyExcludeTypeNames.Split(;))" />
23+
<!-- legacy properties/items -->
24+
<IgnoresAccessChecksTo Include="$(InternalsAssemblyNames.Split(;))" />
25+
<IgnoresAccessChecksTo Include="@(InternalsAssemblyName)" />
26+
<IgnoresAccessChecksToExcludeTypeName Include="$(InternalsAssemblyExcludeTypeNames.Split(;))" />
27+
<IgnoresAccessChecksToExcludeTypeName Include="@(InternalsAssemblyExcludeTypeName)" />
2528
</ItemGroup>
2629
<ItemGroup>
27-
<_IACTG_ReferencePathJoin Include="@(ReferencePath)" InternalsAssemblyName="%(InternalsAssemblyName.Identity)" />
28-
<_IACTG_InputReferencePath Include="@(_IACTG_ReferencePathJoin)" Condition=" '%(Filename)' == '%(InternalsAssemblyName)' " />
30+
<_IACTG_ReferencePathJoin Include="@(ReferencePath)" IgnoresAccessChecksTo="%(IgnoresAccessChecksTo.Identity)" />
31+
<_IACTG_InputReferencePath Include="@(_IACTG_ReferencePathJoin)" Condition=" '%(Filename)' == '%(IgnoresAccessChecksTo)' " />
2932
<_IACTG_ReferencePathJoin Remove="@(_IACTG_ReferencePathJoin)" />
3033
<_IACTG_OutputReferencePath Include="@(_IACTG_InputReferencePath->'$(_IACTG_IntermediatePath)/%(Filename)%(Extension)')" OriginalItemSpec="%(Identity)" />
3134
</ItemGroup>
3235
<ItemGroup>
33-
<_IACTG_Manifest Include="@(InternalsAssemblyExcludeTypeName)" />
36+
<_IACTG_Manifest Include="@(IgnoresAccessChecksToExcludeTypeName)" />
3437
</ItemGroup>
3538
<WriteLinesToFile File="$(_IACTG_ManifestFilePath)" Lines="@(_IACTG_Manifest)" WriteOnlyWhenDifferent="true" Overwrite="true" />
3639
</Target>
@@ -42,8 +45,8 @@
4245
Outputs="@(_IACTG_OutputReferencePath);$(_IACTG_CodeFilePath)"
4346
Returns="@(ReferencePath);@(Compile)">
4447
<PublicizeInternals SourceReferences="@(ReferencePath)"
45-
AssemblyNames="@(InternalsAssemblyName)"
46-
ExcludeTypeNames="@(InternalsAssemblyExcludeTypeName)"
48+
AssemblyNames="@(IgnoresAccessChecksTo)"
49+
ExcludeTypeNames="@(IgnoresAccessChecksToExcludeTypeName)"
4750
IntermediateOutputPath="$(_IACTG_IntermediatePath)"
4851
GeneratedCodeFilePath="$(_IACTG_CodeFilePath)" />
4952
<ItemGroup>

test/IgnoresAccessChecksToGenerator.Test/IgnoresAccessChecksToGenerator.Test.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
55
<OutputType>Exe</OutputType>
6-
<Axxx>true</Axxx>
76
</PropertyGroup>
87

98
<ItemGroup>
10-
<InternalsAssemblyName Include="Microsoft.CodeAnalysis" />
11-
<InternalsAssemblyName Include="Microsoft.CodeAnalysis.CSharp" />
12-
<InternalsAssemblyExcludeTypeName Include="Microsoft.CodeAnalysis.CSharp.AccessCheck" />
9+
<IgnoresAccessChecksTo Include="Microsoft.CodeAnalysis" />
10+
<IgnoresAccessChecksTo Include="Microsoft.CodeAnalysis.CSharp" />
11+
<IgnoresAccessChecksToExcludeTypeName Include="Microsoft.CodeAnalysis.CSharp.AccessCheck" />
1312
</ItemGroup>
1413

1514
<ItemGroup>

0 commit comments

Comments
 (0)