Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AzureAuth to .NET 8 version #412

Merged
merged 14 commits into from
Nov 7, 2024
Merged
2 changes: 1 addition & 1 deletion .github/workflows/azure-devops-pipelines-cg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extends:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '6.x'
version: '8.x'
Haard30 marked this conversation as resolved.
Show resolved Hide resolved
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Setup .NET 6
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Get Azure DevOps Access Token
id: getToken
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Temporarily paused the publishing of Linux binaries.
- Upgrade MSAL from `4.59.1` to `4.61.3`.
- Upgrade Lasso from `2024.8.24.1` to `2024.10.14.1`.
- Upgrade Lasso from `2024.8.24.1` to `2024.10.23.1`.
- Upgrade from .NET 6 to .NET 8.
- Disable trimmed version when publishing AzureAuth.

## [0.8.6] - 2024-04-25
### Changed
Expand Down
2 changes: 1 addition & 1 deletion bin/win/publish.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ if exist %~dp0\dist (
rmdir /S /Q %~dp0\dist
)

CALL %~dp0\dotnet.cmd publish %~dp0\..\..\src\AzureAuth\AzureAuth.csproj --self-contained true -r win10-x64 -c release -o %~dp0\..\..\dist %*
CALL %~dp0\dotnet.cmd publish %~dp0\..\..\src\AzureAuth\AzureAuth.csproj --self-contained true -r win-x64 -c release -o %~dp0\..\..\dist %*
reillysiemens marked this conversation as resolved.
Show resolved Hide resolved
15 changes: 4 additions & 11 deletions src/AdoPat.Test/AdoPat.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>

<!-- Stylecop warnings as errors flag for build to fail -->
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.Test.cs" Link="GlobalSuppressions.Test.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.Test.cs" Link="GlobalSuppressions.Test.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.3" />
Expand All @@ -24,10 +19,8 @@
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="Moq" Version="4.18.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TestHelper\TestHelper.csproj" />
<ProjectReference Include="..\AdoPat\AdoPat.csproj" />
</ItemGroup>

</Project>
</Project>
14 changes: 5 additions & 9 deletions src/AdoPat/AdoPat.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>Microsoft.Authentication.AdoPat</PackageId>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<RootNamespace>Microsoft.Authentication.AdoPat</RootNamespace>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.61.3" />
<PackageReference Include="Microsoft.VisualStudio.Services.Client" Version="19.239.0-preview" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />

<!-- Transitive dependencies of Microsoft.VisualStudio.Services.Client temporarily pinned for security reasons. -->
<PackageReference Include="System.Formats.Asn1" Version="6.0.1" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.2" />
</ItemGroup>

</Project>
</Project>
14 changes: 4 additions & 10 deletions src/AzureAuth.Test/AzureAuth.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<DefineConstants>PlatformWindows</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<PackageId>Microsoft.Authentication.AzureAuth.Test</PackageId>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.Test.cs" Link="GlobalSuppressions.Test.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.Test.cs" Link="GlobalSuppressions.Test.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.3" />
Expand All @@ -26,10 +22,8 @@
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="7.0.7" />
<PackageReference Include="Moq" Version="4.17.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AzureAuth\AzureAuth.csproj" />
<ProjectReference Include="..\TestHelper\TestHelper.csproj" />
</ItemGroup>

</Project>
</Project>
19 changes: 5 additions & 14 deletions src/AzureAuth/AzureAuth.csproj
Original file line number Diff line number Diff line change
@@ -1,50 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<DefineConstants>PlatformWindows</DefineConstants>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>

<!-- Release configuration -->
<!-- Release configuration -->
<PropertyGroup Condition="'$(Configuration)'=='release'">
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunShowWarnings>true</PublishReadyToRunShowWarnings>
<PublishTrimmed>true</PublishTrimmed>
<PublishTrimmed>false</PublishTrimmed>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<!-- Output an executable -->
<PackageId>microsoft.authentication.azureauth</PackageId>
<OutputType>Exe</OutputType>
<AssemblyName>azureauth</AssemblyName>
<RootNamespace>Microsoft.Authentication.AzureAuth</RootNamespace>

<NuspecFile>AzureAuth.nuspec</NuspecFile>
<NuspecProperties>$(NuspecProperties);Configuration=$(Configuration);Version=$(Version)$(VersionSuffix)</NuspecProperties>

<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Office.Lasso" Version="2024.10.14.1" />
<PackageReference Include="Microsoft.Office.Lasso" Version="2024.10.23.1" />
<PackageReference Include="Tomlyn" Version="0.11.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MSALWrapper\MSALWrapper.csproj" />
<ProjectReference Include="..\AdoPat\AdoPat.csproj" />
</ItemGroup>

<!-- Assemblies we need to manually mark as roots so they are not trimmed. -->
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<!-- Needed for Web mode on Windows -->
<TrimmerRootAssembly Include="System.Private.CoreLib" />
</ItemGroup>
</Project>
</Project>
77 changes: 34 additions & 43 deletions src/MSALWrapper.Benchmark/MSALWrapper.Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<DefineConstants>PlatformWindows</DefineConstants>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Microsoft.Authentication.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.2" />
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.61.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MSALWrapper\MSALWrapper.csproj" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<!--Windows: Explicitly continue using the net5 version of MSAL since there is no net6 target yet
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<TargetFramework>net8.0</TargetFramework>
<DefineConstants>PlatformWindows</DefineConstants>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Microsoft.Authentication.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.2" />
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.61.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MSALWrapper\MSALWrapper.csproj" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<!--Windows: Explicitly continue using the net5 version of MSAL since there is no net6 target yet
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/3682-->
<PackageReference Include="Microsoft.Identity.Client" GeneratePathProperty="true">
<Version>4.61.3</Version>
</PackageReference>

<Reference Include="Microsoft.Identity.Client">
<HintPath>$(PkgPMicrosoft_Identity_Client)\lib\net5.0-windows10.0.17763\Microsoft.Identity.Client.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows')) == false">
<Reference Include="Microsoft.Identity.Client" GeneratePathProperty="true">
<HintPath>$(PkgPMicrosoft_Identity_Client)\lib\net5.0-windows10.0.17763\Microsoft.Identity.Client.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows')) == false">
<!-- Not Windows: simple package reference -->
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />
</ItemGroup>
</Project>
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />
</ItemGroup>
</Project>
10 changes: 2 additions & 8 deletions src/MSALWrapper.Test/MSALWrapper.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<AssemblyName>Microsoft.Authentication.MSALWrapper.Test</AssemblyName>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.Test.cs" Link="GlobalSuppressions.Test.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.1.0" />
<PackageReference Include="nunit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.3" />
<PackageReference Include="Moq" Version="4.17.2" />
</ItemGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<DefineConstants>PlatformWindows</DefineConstants>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\TestHelper\TestHelper.csproj" />
<ProjectReference Include="..\MSALWrapper\MSALWrapper.csproj" />
</ItemGroup>

</Project>
</Project>
13 changes: 2 additions & 11 deletions src/MSALWrapper/MSALWrapper.csproj
Original file line number Diff line number Diff line change
@@ -1,40 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- Package Naming, Building, & Versioning -->
<PackageId>Microsoft.Authentication.MSALWrapper</PackageId>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Microsoft.Authentication.MSALWrapper</RootNamespace>

<PackageOutputPath>../</PackageOutputPath>

<!-- Human Metadata -->
<Title>Microsoft Authentication MSAL Wrapper</Title>
<RepositoryUrl>https://github.com/AzureAD/microsoft-authentication-cli</RepositoryUrl>
<Description>A library for quickly authenticating with various Azure resources</Description>
<PackageTags>MSAL;authentication</PackageTags>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<DefineConstants>PlatformWindows</DefineConstants>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.61.3" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.5.0" />
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.61.3" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />

</ItemGroup>

</Project>
9 changes: 3 additions & 6 deletions src/TestHelper/TestHelper.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.3" />
</ItemGroup>

</Project>
</Project>
Loading