Skip to content

Commit

Permalink
OneBranch Fixes (#4193)
Browse files Browse the repository at this point in the history
* Updating android sdk installer

* Adding windows install script

* Add Windows Install

* Script fix for winSDK install

* PS Update

* Revert "Adding windows install script"

This reverts commit 79aa528.

* Moving uap behind maui support porperty

* Adding maui flag

* Updating UAP property conditins

* Suppressing UAP error

* Adding OneBranch suppression

* Adding OneBranch workaround

* Removing workaround

* Adding roslyn suppression

* updating file path

* Updating roslyn task

* Updating suppressions

* Roslyn parameter update

* Adding OneBranch workaround

* Workaround update

* fix

* suppression update

* OneBranch Fix

* update

* build update

* disabling roslyn for OneBranch

* removing binskim

* Removing TSA Upload

* removing workaround

* fix

* Updating System.Drawing.Common package

* removing dead code
removing mobile targets from cloud build

* PR Feedback

* Update Microsoft.Identity.Client.csproj

* Update Microsoft.Identity.Client.csproj

* Update Microsoft.Identity.Client.csproj

---------

Co-authored-by: trwalke <[email protected]>
Co-authored-by: Gladwin Johnson <[email protected]>
  • Loading branch information
3 people authored Jul 6, 2023
1 parent 47b5997 commit f72f238
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 42 deletions.
6 changes: 5 additions & 1 deletion build/InstallAndroid.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $fileName = "AndroidTools.zip"
$source = "C:\Downloads\$fileName"
$destination = "C:\Downloads\AndroidSdkTools"
$androidSdk = "C:\Program Files (x86)\Android\android-sdk"
$androidSdkVersion28 = "platforms;android-28"
$androidSdkVersion29 = "platforms;android-29"
$androidSdkVersion30 = "platforms;android-30"

Expand Down Expand Up @@ -31,8 +32,11 @@ Copy-Item -Path microsoft-authentication-library-for-dotnet\build\AndroidSdkLice

dir "$androidSdk\licenses"

echo "installing android 29"
echo "installing android 28"
C:\Downloads\AndroidSdkTools\cmdline-tools\bin\.\sdkmanager --licenses --sdk_root="$androidSdk"
echo y y y y y y y |C:\Downloads\AndroidSdkTools\cmdline-tools\bin\.\sdkmanager "$androidSdkVersion28" --sdk_root="$androidSdk"

echo "installing android 29"
echo y y y y y y y |C:\Downloads\AndroidSdkTools\cmdline-tools\bin\.\sdkmanager "$androidSdkVersion29" --sdk_root="$androidSdk"

echo "installing android 30"
Expand Down
4 changes: 2 additions & 2 deletions build/pipeline-perf-tests-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pool:
variables:
BuildPlatform: 'any cpu'
BuildConfiguration: 'release'
MSAL_DESKTOP_ONLY_DEV: 'true' # skips building mobile and legacy targets
INCLUDE_MOBILE_AND_LEGACY_TFM: 'true' # skips building mobile and legacy targets

jobs:
- job: 'BuildJob'
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
msbuildArchitecture: x64
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArguments: '/p:RunCodeAnalysis=false /p:MSAL_DESKTOP_ONLY_DEV=$(MSAL_DESKTOP_ONLY_DEV)'
msbuildArguments: '/p:RunCodeAnalysis=false /p:INCLUDE_MOBILE_AND_LEGACY_TFM =$(INCLUDE_MOBILE_AND_LEGACY_TFM )'
clean: true

# The parameters currently are not used, but can be uploaded into the reporting system in the future.
Expand Down
8 changes: 1 addition & 7 deletions build/template-OneBranch-libsandsamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,4 @@ steps:
platform: ${{ parameters.BuildPlatform }}
configuration: ${{ parameters.BuildConfiguration }}

# Run Post-build code analysis (e.g. Roslyn)
- template: template-postbuild-code-analysis.yaml

- template: template-pack-and-sign-all-nugets.yaml

# Publish analysis and cleanup
- template: template-publish-analysis-and-cleanup.yaml
- template: template-pack-and-sign-all-nugets.yaml
6 changes: 5 additions & 1 deletion build/template-postbuild-code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ steps:
displayName: 'Run Roslyn Analyzers'
inputs:
userProvideBuildInfo: auto
suppressionFileForCompilerWarnings: 'microsoft-authentication-library-for-dotnet\RoslynSuppressions.txt'
msBuildCommandline: 'dotnet build'
rulesetName: Recommended
rulesetVersion: Latest
env:
system_accesstoken: $(System.AccessToken)
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
displayName: 'Check Roslyn Results '
inputs:
GdnBreakGdnToolRoslynAnalyzers: true
GdnBreakGdnToolRoslynAnalyzers: true
7 changes: 0 additions & 7 deletions build/template-publish-analysis-and-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,5 @@ steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3
displayName: 'Publish Security Analysis Logs'

- task: securedevelopmentteam.vss-secure-development-tools.build-task-uploadtotsa.TSAUpload@2
displayName: 'TSA upload to Codebase: Unified .NET Core Stamp: Azure'
inputs:
GdnPublishTsaOnboard: false
GdnPublishTsaConfigFile: '$(Build.SourcesDirectory)/build/tsaConfig.json'
continueOnError: true

- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
15 changes: 1 addition & 14 deletions build/template-sign-binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,4 @@ steps:
]
SessionTimeout: 20
VerboseLogin: true
timeoutInMinutes: 10

- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4
displayName: 'Run BinSkim ${{ parameters.Pattern }}'
inputs:
InputType: Basic
AnalyzeTargetGlob: ${{ parameters.Pattern }}
AnalyzeVerbose: true
AnalyzeHashes: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
displayName: 'Check BinSkim Results'
inputs:
GdnBreakGdnToolBinSkim: true
timeoutInMinutes: 10
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworkNetStandard>netstandard2.0</TargetFrameworkNetStandard>
<TargetFrameworkNetDesktop Condition="$([MSBuild]::IsOsPlatform('Windows')) and '$(MSAL_DESKTOP_ONLY_DEV)' == ''">net461</TargetFrameworkNetDesktop>
<TargetFrameworkNetDesktop Condition="$([MSBuild]::IsOsPlatform('Windows')) and '$(INCLUDE_MOBILE_AND_LEGACY_TFM)' == ''">net461</TargetFrameworkNetDesktop>

<LangVersion>8.0</LangVersion>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
<Configurations>Debug;Release;Debug + MobileApps</Configurations>
</PropertyGroup>

<!-- Mobile and legacy targets - comment these out or set env variable MSAL_DESKTOP_ONLY_DEV to speedup the build -->
<PropertyGroup Condition="'$(MSAL_DESKTOP_ONLY_DEV)' == ''">
<!-- Mobile and legacy targets - comment these out or set env variable INCLUDE_MOBILE_AND_LEGACY_TFM to speedup the build -->
<PropertyGroup Condition="'$(INCLUDE_MOBILE_AND_LEGACY_TFM)' != ''">
<TargetFrameworkNetDesktop45>net45</TargetFrameworkNetDesktop45>
<TargetFrameworkUap>uap10.0.17763</TargetFrameworkUap>
<TargetFrameworkIos>Xamarin.iOS10</TargetFrameworkIos>
<TargetFrameworkAndroid9>MonoAndroid9.0</TargetFrameworkAndroid9>
<TargetFrameworkAndroid10>MonoAndroid10.0</TargetFrameworkAndroid10>
</PropertyGroup>

<!-- MAUI -->
<PropertyGroup Condition="'$(MAUI_SUPPORT)' != ''">
<TargetFrameworkNet6Android>net6.0-android</TargetFrameworkNet6Android>
<TargetFrameworkNet6Ios>net6.0-ios15.4</TargetFrameworkNet6Ios>
</PropertyGroup>

<!-- UAP -->
<PropertyGroup Condition="'$(PipelineType)' != 'OneBranch' and '$(INCLUDE_MOBILE_AND_LEGACY_TFM)' != ''">
<TargetFrameworkUap>uap10.0.17763</TargetFrameworkUap>
</PropertyGroup>

<!-- net6.0 (MAUI) -->
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6Ios)' or '$(TargetFramework)' == '$(TargetFrameworkNet6Mac)' or '$(TargetFramework)' == '$(TargetFrameworkNet6Android)'">
<DefineConstants>$(DefineConstants);MAUI</DefineConstants>
Expand Down Expand Up @@ -236,7 +236,7 @@
<Reference Include="System.Xml" />

</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkUap)' ">
<ItemGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkUap)' And '$(PipelineType)' != 'OneBranch'">
<Compile Include="$(PathToMsalSources)\Platforms\uap\**\*.cs" />
<Compile Include="$(PathToMsalSources)\PlatformsCommon\PlatformNotSupported\ApiConfig\SystemWebViewOptions.cs" />
<Compile Include="$(PathToMsalSources)\Platforms\Features\WamBroker\**\*.cs" Exclude="$(PathToMsalSources)\Platforms\Features\WamBroker\win32\**\*.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Text.Json.Serialization.Metadata;
using Microsoft.Identity.Client.Cache;
using Microsoft.Identity.Client.Instance.Discovery;
using Microsoft.Identity.Client.Instance.Oidc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.*" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.*" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.*" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="System.Drawing.Common" Version="4.7.2" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions tests/devapps/WAM/UWPWam/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
namespace UWP_standalone
{
#pragma warning disable CS0618 // Type or member is obsolete
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
Expand Down

0 comments on commit f72f238

Please sign in to comment.