Skip to content

Commit 1fb9929

Browse files
authored
Update toolset version (#77)
1 parent aa4edcd commit 1fb9929

20 files changed

Lines changed: 277 additions & 274 deletions

BenchmarkComponent/BenchmarkComponent.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace winrt::BenchmarkComponent::implementation
4646
return 1;
4747
}
4848

49-
void ClassWithMultipleInterfaces::IntProperty(int32_t val)
49+
void ClassWithMultipleInterfaces::IntProperty(int32_t /*val*/)
5050
{
5151
}
5252

@@ -55,7 +55,7 @@ namespace winrt::BenchmarkComponent::implementation
5555
return true;
5656
}
5757

58-
void ClassWithMultipleInterfaces::BoolProperty(bool val)
58+
void ClassWithMultipleInterfaces::BoolProperty(bool /*val*/)
5959
{
6060
}
6161

@@ -64,7 +64,7 @@ namespace winrt::BenchmarkComponent::implementation
6464
return 1;
6565
}
6666

67-
void ClassWithMultipleInterfaces::DoubleProperty(double val)
67+
void ClassWithMultipleInterfaces::DoubleProperty(double /*val*/)
6868
{
6969
}
7070

@@ -83,22 +83,22 @@ namespace winrt::BenchmarkComponent::implementation
8383
return 1;
8484
}
8585

86-
void ClassWithMultipleInterfaces::DefaultIntProperty(int32_t val)
86+
void ClassWithMultipleInterfaces::DefaultIntProperty(int32_t /*val*/)
8787
{
8888
}
8989

90-
void ClassWithMultipleInterfaces::DefaultBoolProperty(bool val)
90+
void ClassWithMultipleInterfaces::DefaultBoolProperty(bool /*val*/)
9191
{
9292
}
9393

94-
void ClassWithMultipleInterfaces::DefaultDoubleProperty(double val)
94+
void ClassWithMultipleInterfaces::DefaultDoubleProperty(double /*val*/)
9595
{
9696
}
9797

9898
void ClassWithMultipleInterfaces::QueryBoolInterface(IIntProperties properties)
9999
{
100100
auto boolProperties = properties.as<IBoolProperties>();
101-
boolProperties.BoolProperty();
101+
(void)boolProperties.BoolProperty();
102102
}
103103

104104
Windows::Foundation::Collections::IVector<winrt::hstring> createList()
@@ -123,7 +123,7 @@ namespace winrt::BenchmarkComponent::implementation
123123
return hstring();
124124
}
125125

126-
void ClassWithMarshalingRoutines::DefaultStringProperty(hstring val)
126+
void ClassWithMarshalingRoutines::DefaultStringProperty(hstring /*val*/)
127127
{
128128
}
129129

@@ -168,7 +168,7 @@ namespace winrt::BenchmarkComponent::implementation
168168
return createKeyValuePairObject();
169169
}
170170

171-
void ClassWithMarshalingRoutines::NewTypeErasedKeyValuePairObject(Windows::Foundation::IInspectable val)
171+
void ClassWithMarshalingRoutines::NewTypeErasedKeyValuePairObject(Windows::Foundation::IInspectable /*val*/)
172172
{
173173
}
174174

@@ -177,7 +177,7 @@ namespace winrt::BenchmarkComponent::implementation
177177
return createNullableObject();
178178
}
179179

180-
void ClassWithMarshalingRoutines::NewTypeErasedNullableObject(Windows::Foundation::IInspectable val)
180+
void ClassWithMarshalingRoutines::NewTypeErasedNullableObject(Windows::Foundation::IInspectable /*val*/)
181181
{
182182
}
183183

@@ -186,7 +186,7 @@ namespace winrt::BenchmarkComponent::implementation
186186
return createArrayObject();
187187
}
188188

189-
void ClassWithMarshalingRoutines::NewTypeErasedArrayObject(Windows::Foundation::IInspectable val)
189+
void ClassWithMarshalingRoutines::NewTypeErasedArrayObject(Windows::Foundation::IInspectable /*val*/)
190190
{
191191
}
192192

@@ -195,7 +195,7 @@ namespace winrt::BenchmarkComponent::implementation
195195
return keyValuePairObject;
196196
}
197197

198-
void ClassWithMarshalingRoutines::ExistingTypeErasedKeyValuePairObject(Windows::Foundation::IInspectable val)
198+
void ClassWithMarshalingRoutines::ExistingTypeErasedKeyValuePairObject(Windows::Foundation::IInspectable /*val*/)
199199
{
200200
}
201201

@@ -204,7 +204,7 @@ namespace winrt::BenchmarkComponent::implementation
204204
return nullableObject;
205205
}
206206

207-
void ClassWithMarshalingRoutines::ExistingTypeErasedNullableObject(Windows::Foundation::IInspectable val)
207+
void ClassWithMarshalingRoutines::ExistingTypeErasedNullableObject(Windows::Foundation::IInspectable /*val*/)
208208
{
209209
}
210210

@@ -213,7 +213,7 @@ namespace winrt::BenchmarkComponent::implementation
213213
return arrayObject;
214214
}
215215

216-
void ClassWithMarshalingRoutines::ExistingTypeErasedArrayObject(Windows::Foundation::IInspectable val)
216+
void ClassWithMarshalingRoutines::ExistingTypeErasedArrayObject(Windows::Foundation::IInspectable /*val*/)
217217
{
218218
}
219219

@@ -222,7 +222,7 @@ namespace winrt::BenchmarkComponent::implementation
222222
return make<WrappedClass>();
223223
}
224224

225-
void ClassWithMarshalingRoutines::NewWrappedClassObject(BenchmarkComponent::WrappedClass val)
225+
void ClassWithMarshalingRoutines::NewWrappedClassObject(BenchmarkComponent::WrappedClass /*val*/)
226226
{
227227
}
228228

@@ -232,7 +232,7 @@ namespace winrt::BenchmarkComponent::implementation
232232
return uri;
233233
}
234234

235-
void ClassWithMarshalingRoutines::NewUri(Windows::Foundation::Uri val)
235+
void ClassWithMarshalingRoutines::NewUri(Windows::Foundation::Uri /*val*/)
236236
{
237237
}
238238

@@ -241,7 +241,7 @@ namespace winrt::BenchmarkComponent::implementation
241241
return _uri;
242242
}
243243

244-
void ClassWithMarshalingRoutines::ExistingUri(Windows::Foundation::Uri val)
244+
void ClassWithMarshalingRoutines::ExistingUri(Windows::Foundation::Uri /*val*/)
245245
{
246246
}
247247

@@ -251,7 +251,7 @@ namespace winrt::BenchmarkComponent::implementation
251251
return type;
252252
}
253253

254-
void ClassWithMarshalingRoutines::NewType(Windows::UI::Xaml::Interop::TypeName val)
254+
void ClassWithMarshalingRoutines::NewType(Windows::UI::Xaml::Interop::TypeName /*val*/)
255255
{
256256
}
257257

@@ -260,7 +260,7 @@ namespace winrt::BenchmarkComponent::implementation
260260
return _type;
261261
}
262262

263-
void ClassWithMarshalingRoutines::ExistingType(Windows::UI::Xaml::Interop::TypeName val)
263+
void ClassWithMarshalingRoutines::ExistingType(Windows::UI::Xaml::Interop::TypeName /*val*/)
264264
{
265265
}
266266

@@ -294,7 +294,7 @@ namespace winrt::BenchmarkComponent::implementation
294294
}
295295
void ClassWithMarshalingRoutines::NullableTimeSpan(Windows::Foundation::IReference<Windows::Foundation::TimeSpan> const& value)
296296
{
297-
_int = value.Value().count();
297+
_int = static_cast<int32_t>(value.Value().count());
298298
}
299299
Windows::Foundation::IInspectable ClassWithMarshalingRoutines::BoxedDelegate()
300300
{
@@ -325,7 +325,7 @@ namespace winrt::BenchmarkComponent::implementation
325325
return int32_t();
326326
}
327327

328-
void WrappedClass::DefaultIntProperty(int32_t val)
328+
void WrappedClass::DefaultIntProperty(int32_t /*val*/)
329329
{
330330
}
331331

@@ -385,14 +385,14 @@ namespace winrt::BenchmarkComponent::implementation
385385
}
386386
void EventOperations::AddIntEvent()
387387
{
388-
intEventToken = events.IntPropertyChanged([this](IInspectable const& sender, int32_t value)
388+
intEventToken = events.IntPropertyChanged([this](IInspectable const& /*sender*/, int32_t value)
389389
{
390390
intVal = value;
391391
});
392392
}
393393
void EventOperations::AddDoubleEvent()
394394
{
395-
doubleEventToken = events.DoublePropertyChanged([this](IInspectable const& sender, double_t value)
395+
doubleEventToken = events.DoublePropertyChanged([this](IInspectable const& /*sender*/, double_t value)
396396
{
397397
doubleVal = value;
398398
});
@@ -456,7 +456,7 @@ namespace winrt::BenchmarkComponent::implementation
456456
return true;
457457
}
458458

459-
void Composable::BoolProperty(bool val)
459+
void Composable::BoolProperty(bool /*val*/)
460460
{
461461
}
462462
}

BenchmarkComponent/BenchmarkComponent.vcxproj

Lines changed: 8 additions & 10 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.201113.7\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201113.7\build\native\Microsoft.Windows.CppWinRT.props')" />
3+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props')" />
44
<PropertyGroup Label="Globals">
55
<CppWinRTVerbosity>high</CppWinRTVerbosity>
66
<CppWinRTOptimized>true</CppWinRTOptimized>
@@ -47,14 +47,11 @@
4747
</ItemGroup>
4848
<PropertyGroup Label="Configuration">
4949
<ConfigurationType>DynamicLibrary</ConfigurationType>
50-
<PlatformToolset>v140</PlatformToolset>
51-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
52-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
53-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
50+
<PlatformToolset>v143</PlatformToolset>
51+
<PlatformToolset Condition="'$(VisualStudioVersion)' == '18.0'">v145</PlatformToolset>
5452
<CharacterSet>Unicode</CharacterSet>
5553
<GenerateManifest>false</GenerateManifest>
5654
</PropertyGroup>
57-
5855
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
5956
<ImportGroup Label="ExtensionSettings">
6057
</ImportGroup>
@@ -75,6 +72,7 @@
7572
<PrecompiledHeader>Use</PrecompiledHeader>
7673
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
7774
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
75+
<LanguageStandard>stdcpp20</LanguageStandard>
7876
<WarningLevel>Level4</WarningLevel>
7977
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
8078
<!--Temporarily disable cppwinrt heap enforcement to work around xaml compiler generated std::shared_ptr use -->
@@ -108,7 +106,7 @@
108106
</ClCompile>
109107
</ItemGroup>
110108
<ItemGroup>
111-
<Midl Include="BenchmarkComponent.idl" >
109+
<Midl Include="BenchmarkComponent.idl">
112110
<AdditionalOptions>/fastabi %(AdditionalOptions)</AdditionalOptions>
113111
</Midl>
114112
</ItemGroup>
@@ -118,13 +116,13 @@
118116
</ItemGroup>
119117
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
120118
<ImportGroup Label="ExtensionTargets">
121-
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.201113.7\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201113.7\build\native\Microsoft.Windows.CppWinRT.targets')" />
119+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
122120
</ImportGroup>
123121
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
124122
<PropertyGroup>
125123
<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>
126124
</PropertyGroup>
127-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201113.7\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.201113.7\build\native\Microsoft.Windows.CppWinRT.props'))" />
128-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201113.7\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.201113.7\build\native\Microsoft.Windows.CppWinRT.targets'))" />
125+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
126+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
129127
</Target>
130128
</Project>

BenchmarkComponent/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Windows.CppWinRT" version="2.0.201113.7" targetFramework="native" />
3+
<package id="Microsoft.Windows.CppWinRT" version="2.0.250303.1" targetFramework="native" />
44
</packages>

BenchmarkComponent/pch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22
#include <unknwn.h>
3+
#undef GetCurrentTime
34
#include <winrt/Windows.Foundation.h>
45
#include <winrt/Windows.Foundation.Collections.h>
56
#include <winrt/Windows.UI.Xaml.Interop.h>

Console/Console.vcxproj

Lines changed: 7 additions & 6 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.200729.8\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.props')" />
3+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props')" />
44
<PropertyGroup Label="Globals">
55
<CppWinRTOptimized>true</CppWinRTOptimized>
66
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
@@ -9,7 +9,7 @@
99
<ProjectGuid>{8ab80bfd-185a-452d-aad2-97b38aed3e4b}</ProjectGuid>
1010
<Keyword>Win32Proj</Keyword>
1111
<RootNamespace>Console</RootNamespace>
12-
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
12+
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0</WindowsTargetPlatformVersion>
1313
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
1414
</PropertyGroup>
1515
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -34,7 +34,7 @@
3434
<PropertyGroup Label="Configuration">
3535
<ConfigurationType>Application</ConfigurationType>
3636
<PlatformToolset>v143</PlatformToolset>
37-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
37+
<PlatformToolset Condition="'$(VisualStudioVersion)' == '18.0'">v145</PlatformToolset>
3838
<CharacterSet>Unicode</CharacterSet>
3939
</PropertyGroup>
4040
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
@@ -60,6 +60,7 @@
6060
<PrecompiledHeader>Use</PrecompiledHeader>
6161
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
6262
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
63+
<LanguageStandard>stdcpp20</LanguageStandard>
6364
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
6465
<WarningLevel>Level4</WarningLevel>
6566
<AdditionalOptions>%(AdditionalOptions) /permissive- /bigobj</AdditionalOptions>
@@ -114,13 +115,13 @@
114115
</ItemGroup>
115116
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
116117
<ImportGroup Label="ExtensionTargets">
117-
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets')" />
118+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
118119
</ImportGroup>
119120
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
120121
<PropertyGroup>
121122
<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>
122123
</PropertyGroup>
123-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.props'))" />
124-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets'))" />
124+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
125+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
125126
</Target>
126127
</Project>

Console/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Windows.CppWinRT" version="2.0.200729.8" targetFramework="native" />
3+
<package id="Microsoft.Windows.CppWinRT" version="2.0.250303.1" targetFramework="native" />
44
</packages>

0 commit comments

Comments
 (0)