Skip to content

Commit b39181f

Browse files
committed
Merged PR 13727530: Include SymCrypt undocked properties to fix SDL errors
This change fixes binskim error BA2008 which was caused by not having control flow guard enabled for the NuGet test application. Although that application is only meant to test the NuGet package and thus is never shipped anywhere, it's easier to just fix it than try to get an exception. Related work items: #58731016
1 parent 6d37d53 commit b39181f

File tree

2 files changed

+12
-29
lines changed

2 files changed

+12
-29
lines changed

.pipelines/templates/nuget-windows-undocked.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
configuration: 'Release'
9090

9191
- script: |
92-
.\x64\Release\NuGetTestApplication.exe
92+
.\build\bin\amd64fre\exe\NuGetTestApplication.exe
9393
displayName: 'Run NuGet test application'
9494
workingDirectory: '$(Build.SourcesDirectory)/nuget/test/cpp'
9595

nuget/test/cpp/NuGetTestApplication.vcxproj

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
5+
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
6+
<UseInternalMSUniCrtPackage>true</UseInternalMSUniCrtPackage>
7+
<ProjectGuid>{5ebd6a18-5fb6-4dcc-bc17-40d39dc0ffcb}</ProjectGuid>
8+
<TargetName>NuGetTestApplication</TargetName>
9+
<UndockedType>exe</UndockedType>
10+
<UndockedDir>$(SolutionDir)..\..\..\msbuild\</UndockedDir>
11+
<UndockedOut>$(SolutionDir)</UndockedOut>
12+
</PropertyGroup>
13+
<Import Project="$(UndockedDir)symcrypt.undocked.props" />
314
<ItemGroup Label="ProjectConfigurations">
415
<ProjectConfiguration Include="Debug|x64">
516
<Configuration>Debug</Configuration>
@@ -18,33 +29,6 @@
1829
<Platform>ARM64</Platform>
1930
</ProjectConfiguration>
2031
</ItemGroup>
21-
<PropertyGroup Label="Globals">
22-
<VCProjectVersion>17.0</VCProjectVersion>
23-
<Keyword>Win32Proj</Keyword>
24-
<ProjectGuid>{5ebd6a18-5fb6-4dcc-bc17-40d39dc0ffcb}</ProjectGuid>
25-
<RootNamespace>NuGetTestApplication</RootNamespace>
26-
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27-
</PropertyGroup>
28-
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29-
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
30-
<ConfigurationType>Application</ConfigurationType>
31-
<UseDebugLibraries>true</UseDebugLibraries>
32-
<PlatformToolset>v143</PlatformToolset>
33-
<CharacterSet>Unicode</CharacterSet>
34-
</PropertyGroup>
35-
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
36-
<ConfigurationType>Application</ConfigurationType>
37-
<UseDebugLibraries>false</UseDebugLibraries>
38-
<PlatformToolset>v143</PlatformToolset>
39-
<WholeProgramOptimization>true</WholeProgramOptimization>
40-
<CharacterSet>Unicode</CharacterSet>
41-
</PropertyGroup>
42-
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
43-
<ImportGroup Label="ExtensionSettings">
44-
</ImportGroup>
45-
<ImportGroup Label="Shared">
46-
</ImportGroup>
47-
<PropertyGroup Label="UserMacros" />
4832
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
4933
<ClCompile>
5034
<WarningLevel>Level3</WarningLevel>
@@ -77,7 +61,6 @@
7761
<ItemGroup>
7862
<None Include="packages.config" />
7963
</ItemGroup>
80-
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
8164
<ImportGroup Label="ExtensionTargets">
8265
<Import Project="packages\Microsoft.SymCrypt.$(NuGet_Version)\build\native\Microsoft.SymCrypt.targets" />
8366
</ImportGroup>

0 commit comments

Comments
 (0)