Skip to content

Commit

Permalink
Depend on the BepInEx publicizer for the IgnoresAccessChecksToAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
psyGamer committed Jan 21, 2024
1 parent 15bfefc commit 4e67782
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
1 change: 0 additions & 1 deletion CelestePublicizer.Testing/CelestePublicizer.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@
<ItemGroup>
<PackageReference Include="CelestePublicizer" Version="1.0.0" CelesteAssembly="/media/Storage/Games/Celeste_NETCore3/Celeste.dll" />
</ItemGroup>

</Project>
20 changes: 15 additions & 5 deletions CelestePublicizer/CelestePublicizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,24 @@
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.548"/>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.548"/>
<PackageReference Include="AsmResolver.DotNet" Version="5.0.0" />

<!-- This dependency is only required to provide the IgnoresAccessChecksToAttribute -->
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all" />
<Publicize Include="BepInEx.AssemblyPublicizer.MSBuild" PublicizeTarget="All" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Assets\**\*" />

<Content Include="$(MSBuildProjectName).props;$(OutputPath)\*.dll;$(OutputPath)\*.pdb" Pack="true" PackagePath="build"/>

<Compile Remove="IgnoresAccessChecksToAttribute.cs"/>
<Content Include="IgnoresAccessChecksToAttribute.cs" Pack="true" PackagePath="contentFiles/cs/any" BuildAction="Compile"/>
<Content Include="$(MSBuildProjectName).props" Pack="true" PackagePath="build"/>
</ItemGroup>

<Target Name="PackTaskDependencies" BeforeTargets="GenerateNuspec">
<ItemGroup>
<_PackageFiles Include="$(OutputPath)CelestePublicizer.dll;$(OutputPath)AsmResolver*.dll">
<PackagePath>build</PackagePath>
<Visible>false</Visible>
<BuildAction>Content</BuildAction>
</_PackageFiles>
</ItemGroup>
</Target>
</Project>
9 changes: 1 addition & 8 deletions CelestePublicizer/CelestePublicizer.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<UsingTask TaskName="PublicizeCelesteTask" AssemblyFile="$(_CelestePublicizer_TaskAssembly)" />

<Target Name="PublicizeCeleste" AfterTargets="ResolveReferences" BeforeTargets="FindReferenceAssembliesForReferences">
<Target Name="PublicizeCeleste" AfterTargets="ResolveReferences" BeforeTargets="FindReferenceAssembliesForReferences">
<PublicizeCelesteTask IntermediateOutputPath="$(IntermediateOutputPath)" PackageReference="@(PackageReference)">
<Output TaskParameter="PublicizedReference" ItemName="_PublicizedReference" />
</PublicizeCelesteTask>
Expand All @@ -22,11 +22,4 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
</Target>

<!-- Hide IgnoresAccessChecksToAttribute.cs (https://github.com/NuGet/Home/issues/4856#issuecomment-287957396) -->
<ItemGroup>
<Compile Update="@(Compile)">
<Visible Condition="'%(NuGetItemType)' == 'Compile'">false</Visible>
</Compile>
</ItemGroup>
</Project>
6 changes: 0 additions & 6 deletions CelestePublicizer/IgnoresAccessChecksToAttribute.cs

This file was deleted.

0 comments on commit 4e67782

Please sign in to comment.