forked from dotnet/Open-XML-SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPEVerify.targets
21 lines (17 loc) · 929 Bytes
/
PEVerify.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<Project>
<PropertyGroup>
<!-- .NET Framework builds should pass PEVerify -->
<RunPeVerify Condition=" '$(RunPeVerify)' == '' ">false</RunPeVerify>
<PeVerifyPath Condition=" '$(PeVerifyPath)' == '' ">C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\PEVerify.exe</PeVerifyPath>
</PropertyGroup>
<PropertyGroup Condition="$(IsFramework)">
<Features>$(Features);peverify-compat</Features>
</PropertyGroup>
<Target Name="Run PEVerify" AfterTargets="Build" Condition="$(IsFramework) AND $(RunPeVerify) AND '$(OS)' == 'Windows_NT' ">
<ItemGroup>
<_OutputFileToVerify Include="@(FileWrites)" Condition="'%(Extension)' == '.dll' AND $([System.Text.RegularExpressions.Regex]::IsMatch('%(FullPath)', '.+\\bin\\.+'))" />
</ItemGroup>
<Message Text="Running PEVerify" />
<Exec Command='"$(PeVerifyPath)" %(_OutputFileToVerify.Identity)' />
</Target>
</Project>