Skip to content

Commit c4180b2

Browse files
committed
Handle .NET 8 in generator
1 parent a6c49f0 commit c4180b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nuget/Microsoft.Windows.CsWinRT.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
162162
<CsWinRTExeTFM Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) == 5">net5.0</CsWinRTExeTFM>
163163
<CsWinRTExeTFM Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) == 6">net6.0</CsWinRTExeTFM>
164164
<CsWinRTExeTFM Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) == 7">net7.0</CsWinRTExeTFM>
165-
<CsWinRTExeTFM Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) == 8">net8.0</CsWinRTExeTFM>
165+
<CsWinRTExeTFM Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) >= 8">net8.0</CsWinRTExeTFM>
166166
<CsWinRTExeTFM Condition="'$(CsWinRTExeTFM)' == ''">netstandard2.0</CsWinRTExeTFM>
167167

168168
<CsWinRTParams Condition="'$(CsWinRTParams)' == ''">

src/cswinrt/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Where <spec> is one or more of:
9191

9292
settings.verbose = args.exists("verbose");
9393
auto target = args.value("target");
94-
if (!target.empty() && target != "netstandard2.0" && !starts_with(target, "net5.0") && !starts_with(target, "net6.0") && !starts_with(target, "net7.0"))
94+
if (!target.empty() && target != "netstandard2.0" && !starts_with(target, "net5.0") && !starts_with(target, "net6.0") && !starts_with(target, "net7.0") && !starts_with(target, "net8.0"))
9595
{
9696
throw usage_exception();
9797
}

0 commit comments

Comments
 (0)