Skip to content

Commit eeb8f23

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Rolled back to net6.0 as target framework because autorest uses net6 to build commandlets
1 parent 6e66e98 commit eeb8f23

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/Authentication/Authentication.Core/Microsoft.Graph.Authentication.Core.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<Import Project="$(MSBuildThisFileDirectory)..\..\..\Repo.props" />
33
<PropertyGroup>
44
<LangVersion>9.0</LangVersion>
5-
<TargetFrameworks>netstandard2.0;net472;net8.0</TargetFrameworks>
5+
<TargetFrameworks>netstandard2.0;net6.0;net472</TargetFrameworks>
66
<RootNamespace>Microsoft.Graph.PowerShell.Authentication.Core</RootNamespace>
77
<Version>2.25.0</Version>
8+
<!-- Suppress .NET Target Framework Moniker (TFM) Support Build Warnings -->
9+
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
810
</PropertyGroup>
911
<PropertyGroup>
1012
<EnableNETAnalyzers>true</EnableNETAnalyzers>

src/Authentication/Authentication.Core/Utilities/AuthenticationHelpers.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ private static async Task<TokenCredential> GetEnvironmentCredentialAsync(IAuthCo
6060
{
6161
if (authContext is null)
6262
throw new AuthenticationException(ErrorConstants.Message.MissingAuthContext);
63-
63+
//There is need for explicitly adding TenantId to the TokenCredentialOptions for EnvironmentCredential due to stricter security requirements.
64+
authContext.TenantId = EnvironmentVariables.TenantId;
6465
var tokenCredentialOptions = new TokenCredentialOptions
6566
{
6667
AuthorityHost = new Uri(GetAuthorityUrl(authContext))

src/Authentication/Authentication.Test/Microsoft.Graph.Authentication.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net8.0;net472</TargetFrameworks>
3+
<TargetFrameworks>net6.0;net472</TargetFrameworks>
44
<IsPackable>false</IsPackable>
55
<Version>2.25.0</Version>
66
</PropertyGroup>
77
<ItemGroup>
88
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
99
<!-- As described in this post https://devblogs.microsoft.com/powershell/depending-on-the-right-powershell-nuget-package-in-your-net-project, reference the SDK for dotnetcore-->
10-
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.5.0" PrivateAssets="all" Condition="'$(TargetFramework)' == 'net8.0'" />
10+
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.5.0" PrivateAssets="all" Condition="'$(TargetFramework)' == 'net6.0'" />
1111
<PackageReference Include="Moq" Version="4.20.70" />
1212
<PackageReference Include="xunit" Version="2.4.2" />
1313
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">

src/Authentication/Authentication/build-module.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $ErrorActionPreference = 'Stop'
88
$ModuleName = "Authentication"
99
$ModulePrefix = "Microsoft.Graph"
1010
$netStandard = "netstandard2.0"
11-
$netApp = "net8.0"
11+
$netApp = "net6.0"
1212
$netFx = "net472"
1313
$copyExtensions = @('.dll', '.pdb')
1414

0 commit comments

Comments
 (0)