Skip to content

Commit 4f3155e

Browse files
eerhardtradical
authored andcommitted
Aspire CLI global tool target net8 (#12454)
1 parent 8c0d467 commit 4f3155e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Aspire.Cli/Aspire.Cli.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
<!-- Set the nuget properties when building as a global tool. -->
2121
<PropertyGroup Condition="'$(IsCliToolProject)' == 'true'">
22+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
2223
<IsPackable>true</IsPackable>
2324
<PackAsTool>true</PackAsTool>
2425
<ToolCommandName>aspire</ToolCommandName>

src/Aspire.Cli/Backchannel/ExtensionBackchannel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,10 @@ private X509Certificate2 GetCertificate()
707707
var serverCertificate = _configuration[KnownConfigNames.ExtensionCert];
708708
Debug.Assert(!string.IsNullOrEmpty(serverCertificate));
709709
var data = Convert.FromBase64String(serverCertificate);
710+
#if NET9_0_OR_GREATER
710711
return X509CertificateLoader.LoadCertificate(data);
712+
#else
713+
return new X509Certificate2(data);
714+
#endif
711715
}
712716
}

0 commit comments

Comments
 (0)