Skip to content

Commit

Permalink
Change property from InternalsAssemblyName to IgnoresAccessChecksTo
Browse files Browse the repository at this point in the history
  • Loading branch information
aelij committed Dec 3, 2024
1 parent a47ca91 commit ab49fd5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Just add the package and define `InternalsAssemblyName` items with the assemblie
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<InternalsAssemblyName Include="AssemblyToGrantAccessTo1" />
<InternalsAssemblyName Include="AssemblyToGrantAccessTo2" />
<InternalsAssemblyExcludeTypeName Include="Namespace.TypeName" />
<IgnoresAccessChecksTo Include="AssemblyToGrantAccessTo1" />
<IgnoresAccessChecksTo Include="AssemblyToGrantAccessTo2" />
<IgnoresAccessChecksToExcludeTypeName Include="Namespace.TypeName" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<LangVersion>latest</LangVersion>
<PackageId>IgnoresAccessChecksToGenerator</PackageId>
<Version>0.7.1</Version>
<Version>0.8.0</Version>
<DevelopmentDependency>true</DevelopmentDependency>
<Authors>Eli Arbel</Authors>
<RepositoryUrl>https://github.com/aelij/IgnoresAccessChecksToGenerator</RepositoryUrl>
Expand All @@ -21,8 +21,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Mono.Cecil" Version="0.11.5" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.8.3" />
<PackageReference Include="Mono.Cecil" Version="0.11.6" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.12.6" />
</ItemGroup>

<Target Name="IncludePackageDependencies">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<InternalsAssemblyExcludeTypeName>
<Visible>false</Visible>
</InternalsAssemblyExcludeTypeName>
<IgnoresAccessChecksTo>
<Visible>false</Visible>
</IgnoresAccessChecksTo>
<IgnoresAccessChecksToExcludeTypeName>
<Visible>false</Visible>
</IgnoresAccessChecksToExcludeTypeName>
</ItemDefinitionGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,20 @@
Outputs="$(_IACTG_ManifestFilePath)"
Returns="@(_IACTG_InputReferencePath);@(_IACTG_OutputReferencePath)">
<ItemGroup>
<InternalsAssemblyName Include="$(InternalsAssemblyNames.Split(;))" />
<InternalsAssemblyExcludeTypeName Include="$(InternalsAssemblyExcludeTypeNames.Split(;))" />
<!-- legacy properties/items -->
<IgnoresAccessChecksTo Include="$(InternalsAssemblyNames.Split(;))" />
<IgnoresAccessChecksTo Include="@(InternalsAssemblyName)" />
<IgnoresAccessChecksToExcludeTypeName Include="$(InternalsAssemblyExcludeTypeNames.Split(;))" />
<IgnoresAccessChecksToExcludeTypeName Include="@(InternalsAssemblyExcludeTypeName)" />
</ItemGroup>
<ItemGroup>
<_IACTG_ReferencePathJoin Include="@(ReferencePath)" InternalsAssemblyName="%(InternalsAssemblyName.Identity)" />
<_IACTG_InputReferencePath Include="@(_IACTG_ReferencePathJoin)" Condition=" '%(Filename)' == '%(InternalsAssemblyName)' " />
<_IACTG_ReferencePathJoin Include="@(ReferencePath)" IgnoresAccessChecksTo="%(IgnoresAccessChecksTo.Identity)" />
<_IACTG_InputReferencePath Include="@(_IACTG_ReferencePathJoin)" Condition=" '%(Filename)' == '%(IgnoresAccessChecksTo)' " />
<_IACTG_ReferencePathJoin Remove="@(_IACTG_ReferencePathJoin)" />
<_IACTG_OutputReferencePath Include="@(_IACTG_InputReferencePath->'$(_IACTG_IntermediatePath)/%(Filename)%(Extension)')" OriginalItemSpec="%(Identity)" />
</ItemGroup>
<ItemGroup>
<_IACTG_Manifest Include="@(InternalsAssemblyExcludeTypeName)" />
<_IACTG_Manifest Include="@(IgnoresAccessChecksToExcludeTypeName)" />
</ItemGroup>
<WriteLinesToFile File="$(_IACTG_ManifestFilePath)" Lines="@(_IACTG_Manifest)" WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
Expand All @@ -42,8 +45,8 @@
Outputs="@(_IACTG_OutputReferencePath);$(_IACTG_CodeFilePath)"
Returns="@(ReferencePath);@(Compile)">
<PublicizeInternals SourceReferences="@(ReferencePath)"
AssemblyNames="@(InternalsAssemblyName)"
ExcludeTypeNames="@(InternalsAssemblyExcludeTypeName)"
AssemblyNames="@(IgnoresAccessChecksTo)"
ExcludeTypeNames="@(IgnoresAccessChecksToExcludeTypeName)"
IntermediateOutputPath="$(_IACTG_IntermediatePath)"
GeneratedCodeFilePath="$(_IACTG_CodeFilePath)" />
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<Axxx>true</Axxx>
</PropertyGroup>

<ItemGroup>
<InternalsAssemblyName Include="Microsoft.CodeAnalysis" />
<InternalsAssemblyName Include="Microsoft.CodeAnalysis.CSharp" />
<InternalsAssemblyExcludeTypeName Include="Microsoft.CodeAnalysis.CSharp.AccessCheck" />
<IgnoresAccessChecksTo Include="Microsoft.CodeAnalysis" />
<IgnoresAccessChecksTo Include="Microsoft.CodeAnalysis.CSharp" />
<IgnoresAccessChecksToExcludeTypeName Include="Microsoft.CodeAnalysis.CSharp.AccessCheck" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit ab49fd5

Please sign in to comment.