Skip to content

Commit febda5d

Browse files
authored
Try to fix the disabled/failing nuget test build step (#1451)
These failures were pointed out yesterday when the CLA policy was stuck. They are not blocking but have seemingly been failing for a long time and the failure is suppressed. The issue seems to be that some of these test projects reference an old NuGet package while also referencing the props/targets that are about to go into the new NuGet package. Double-including essentially the same files twice is what caused the build breaks in these projects. Some projects also had build breaks that seem to be related to a very old Windows SDK minimum version. I increased the floor to 10.0.18362.0 (early 2019; almost 6 years ago) and that fixed the remaining breaks. The random packages.config that downloaded random builds of cppwinrt from 2019 or 2020 have been deleted too. This set of changes aims to fix the build breaks and un-suppress this failure. It now builds locally on my device but I'll need an official PR build to ensure that the GitHub Actions flow is also passing.
1 parent 8da8359 commit febda5d

File tree

12 files changed

+9
-42
lines changed

12 files changed

+9
-42
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,6 @@ jobs:
373373
- name: Run nuget test
374374
run: |
375375
cmd /c "$env:VSDevCmd" "&" msbuild /m /clp:ForceConsoleColor "$env:msbuild_config_props" test\nuget\NugetTest.sln
376-
if ($LastExitCode -ne 0) {
377-
echo "::warning::nuget test failed"
378-
}
379-
# FIXME: This build was failing from the start
380-
exit 0
381376
382377
build-nuget:
383378
name: Build nuget package with MSVC

test/nuget/ConsoleApplication1/ConsoleApplication1.vcxproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.props')" />
43
<Import Project="$(ProjectDir)..\..\..\nuget\Microsoft.Windows.CppWinRT.props" />
54
<PropertyGroup Label="Globals">
65
<CppWinRTOptimized>true</CppWinRTOptimized>
@@ -54,7 +53,6 @@
5453
</ImportGroup>
5554
<ImportGroup Label="PropertySheets">
5655
<Import Project="PropertySheet.props" />
57-
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.targets')" />
5856
</ImportGroup>
5957
<PropertyGroup Label="UserMacros" />
6058
<ItemDefinitionGroup>
@@ -121,11 +119,4 @@
121119
</ItemGroup>
122120
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
123121
<Import Project="$(ProjectDir)..\..\..\nuget\Microsoft.Windows.CppWinRT.targets" />
124-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
125-
<PropertyGroup>
126-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
127-
</PropertyGroup>
128-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.props'))" />
129-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.targets'))" />
130-
</Target>
131122
</Project>

test/nuget/ConsoleApplication1/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/nuget/TestRuntimeComponentCSharp/TestRuntimeComponentCSharp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<AssemblyName>TestRuntimeComponentCSharp</AssemblyName>
1212
<DefaultLanguage>en-US</DefaultLanguage>
1313
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14-
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
15-
<TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
14+
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
15+
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
1616
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
1717
<FileAlignment>512</FileAlignment>
1818
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

test/nuget/TestRuntimeComponentNamespaceUnderscore/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/nuget/TestStaticLibrary7/TestStaticLibrary7.vcxproj

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.200117.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200117.5\build\native\Microsoft.Windows.CppWinRT.props')" />
3+
<Import Project="$(ProjectDir)..\..\..\nuget\Microsoft.Windows.CppWinRT.props" />
44
<PropertyGroup Label="Globals">
55
<CppWinRTOptimized>true</CppWinRTOptimized>
66
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
@@ -127,13 +127,6 @@
127127
</ItemGroup>
128128
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
129129
<ImportGroup Label="ExtensionTargets">
130-
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.200117.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200117.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
130+
<Import Project="$(ProjectDir)..\..\..\nuget\Microsoft.Windows.CppWinRT.targets" />
131131
</ImportGroup>
132-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
133-
<PropertyGroup>
134-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
135-
</PropertyGroup>
136-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200117.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200117.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
137-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200117.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200117.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
138-
</Target>
139132
</Project>

test/nuget/TestStaticLibrary7/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.

vsix/ProjectTemplates/VC/Windows Desktop/ConsoleApplication/ConsoleApplication.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Keyword>Win32Proj</Keyword>
1111
<RootNamespace>$safeprojectname$</RootNamespace>
1212
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">$targetplatformversion$</WindowsTargetPlatformVersion>
13-
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
13+
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
1414
</PropertyGroup>
1515
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
1616
<ItemGroup Label="ProjectConfigurations">

vsix/ProjectTemplates/VC/Windows Universal/BlankApp/BlankApp.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ApplicationType>Windows Store</ApplicationType>
1515
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
1616
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">$targetplatformversion$</WindowsTargetPlatformVersion>
17-
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
17+
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
1818
</PropertyGroup>
1919
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2020
<ItemGroup Label="ProjectConfigurations">

vsix/ProjectTemplates/VC/Windows Universal/CoreApp/CoreApp.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ApplicationType>Windows Store</ApplicationType>
1414
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
1515
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">$targetplatformversion$</WindowsTargetPlatformVersion>
16-
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
16+
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
1717
</PropertyGroup>
1818
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
1919
<ItemGroup Label="ProjectConfigurations">

vsix/ProjectTemplates/VC/Windows Universal/StaticLibrary/StaticLibrary.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<ApplicationType>Windows Store</ApplicationType>
1616
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
1717
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">$targetplatformversion$</WindowsTargetPlatformVersion>
18-
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
18+
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
1919
</PropertyGroup>
2020
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2121
<ItemGroup Label="ProjectConfigurations">

vsix/ProjectTemplates/VC/Windows Universal/WindowsRuntimeComponent/WindowsRuntimeComponent.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ApplicationType>Windows Store</ApplicationType>
1515
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
1616
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">$targetplatformversion$</WindowsTargetPlatformVersion>
17-
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
17+
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
1818
</PropertyGroup>
1919
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2020
<ItemGroup Label="ProjectConfigurations">

0 commit comments

Comments
 (0)