-
Notifications
You must be signed in to change notification settings - Fork 8
/
BepInEx.AssemblyPublicizer.MSBuild.props
40 lines (33 loc) · 1.94 KB
/
BepInEx.AssemblyPublicizer.MSBuild.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<Project>
<PropertyGroup>
<_BepInExAssemblyPublicizer_TaskFolder Condition="'$(MSBuildRuntimeType)' == 'Core'">netstandard2.1</_BepInExAssemblyPublicizer_TaskFolder>
<_BepInExAssemblyPublicizer_TaskFolder Condition="'$(MSBuildRuntimeType)' != 'Core'">net472</_BepInExAssemblyPublicizer_TaskFolder>
<_BepInExAssemblyPublicizer_TaskAssembly>$(MSBuildThisFileDirectory)..\lib\$(_BepInExAssemblyPublicizer_TaskFolder)\$(MSBuildThisFileName).dll</_BepInExAssemblyPublicizer_TaskAssembly>
</PropertyGroup>
<UsingTask TaskName="PublicizeTask" AssemblyFile="$(_BepInExAssemblyPublicizer_TaskAssembly)" />
<Target Name="Publicize" AfterTargets="ResolveReferences" BeforeTargets="FindReferenceAssembliesForReferences">
<PublicizeTask IntermediateOutputPath="$(IntermediateOutputPath)" ReferencePath="@(ReferencePath)" Publicize="@(Publicize)">
<Output TaskParameter="RemovedReferences" ItemName="_RemovedReferences" />
<Output TaskParameter="PublicizedReferences" ItemName="_PublicizedReferences" />
</PublicizeTask>
<ItemGroup>
<ReferencePath Remove="@(_RemovedReferences)" />
<ReferencePath Include="@(_PublicizedReferences)" />
<AssemblyAttribute Include="System.Runtime.CompilerServices.IgnoresAccessChecksToAttribute">
<_Parameter1>%(_PublicizedReferences.Filename)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
</Target>
<ItemDefinitionGroup>
<Publicize Visible="false" />
</ItemDefinitionGroup>
<!-- 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>