Skip to content

Commit

Permalink
Remove net6win (#4567)
Browse files Browse the repository at this point in the history
* Attempt

* fix

* fix

* Remove NET_ONLY

* Adress PR comments

* Address PRs

* Update src/client/Microsoft.Identity.Client/ApiConfig/AcquireTokenInteractiveParameterBuilder.cs

Co-authored-by: Peter <34331512+pmaytak@users.noreply.github.com>

* Update src/client/Microsoft.Identity.Client/AppConfig/PublicClientApplicationBuilder.cs

Co-authored-by: Peter <34331512+pmaytak@users.noreply.github.com>

---------

Co-authored-by: Peter <34331512+pmaytak@users.noreply.github.com>
  • Loading branch information
bgavrilMS and pmaytak committed Apr 18, 2024
1 parent 57ca6db commit 3f0348f
Show file tree
Hide file tree
Showing 39 changed files with 125 additions and 1,225 deletions.
47 changes: 0 additions & 47 deletions LibsAndSamples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pipelines", "pipelines", "{
build\pipeline-ci.yaml = build\pipeline-ci.yaml
build\pipeline-perf-tests-automation.yaml = build\pipeline-perf-tests-automation.yaml
build\pipeline-pullrequest.yaml = build\pipeline-pullrequest.yaml
build\pipeline-releasebuild-netonly.yaml = build\pipeline-releasebuild-netonly.yaml
build\pipeline-releasebuild.yaml = build\pipeline-releasebuild.yaml
build\template-build-and-prep-automation.yaml = build\template-build-and-prep-automation.yaml
build\template-build-and-run-all-tests.yaml = build\template-build-and-run-all-tests.yaml
Expand All @@ -86,7 +85,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pipelines", "pipelines", "{
build\template-nuget-pack.yaml = build\template-nuget-pack.yaml
build\template-OneBranch-CI-libsandsamples.yaml = build\template-OneBranch-CI-libsandsamples.yaml
build\template-OneBranch-Release-libsandsamples.yaml = build\template-OneBranch-Release-libsandsamples.yaml
build\template-OneBranch-releasebuild-netonly.yaml = build\template-OneBranch-releasebuild-netonly.yaml
build\template-pack-and-sign-all-nugets.yaml = build\template-pack-and-sign-all-nugets.yaml
build\template-pack-and-sign-nuget.yaml = build\template-pack-and-sign-nuget.yaml
build\template-pack-and-sign-packages.yaml = build\template-pack-and-sign-packages.yaml
Expand Down Expand Up @@ -169,8 +167,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF", "tests\devapps\WAM\MS
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "WPF.Package", "tests\devapps\WAM\MSIX\WPF.Package\WPF.Package.wapproj", "{34E323E8-E706-4DF4-B916-D614FC8CFCEB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestBrokerApp", "tests\devapps\WAM\TestBrokerApp\TestBrokerApp.csproj", "{09E236C9-E431-407C-912D-B3DE64A924F6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MSIHelperService", "tests\devapps\Managed Identity apps\MSIHelperService\MSIHelperService.csproj", "{2EABD781-C0E4-42AA-9E4A-7B415764EDBE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManagedIdentityWebApi", "tests\devapps\Managed Identity apps\ManagedIdentityWebApi\ManagedIdentityWebApi.csproj", "{6BA6689B-2915-4EEF-9ACC-C3E968C40033}"
Expand Down Expand Up @@ -1473,48 +1469,6 @@ Global
{34E323E8-E706-4DF4-B916-D614FC8CFCEB}.Release|x86.ActiveCfg = Release|x86
{34E323E8-E706-4DF4-B916-D614FC8CFCEB}.Release|x86.Build.0 = Release|x86
{34E323E8-E706-4DF4-B916-D614FC8CFCEB}.Release|x86.Deploy.0 = Release|x86
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|Any CPU.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|Any CPU.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|ARM.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|ARM.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|ARM64.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|ARM64.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|iPhone.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|iPhone.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|iPhoneSimulator.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|x64.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|x64.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|x86.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug + MobileApps|x86.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|ARM.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|ARM.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|ARM64.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|iPhone.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|x64.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|x64.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|x86.ActiveCfg = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Debug|x86.Build.0 = Debug|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|Any CPU.Build.0 = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|ARM.ActiveCfg = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|ARM.Build.0 = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|ARM64.ActiveCfg = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|ARM64.Build.0 = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|iPhone.ActiveCfg = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|iPhone.Build.0 = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|x64.ActiveCfg = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|x64.Build.0 = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|x86.ActiveCfg = Release|Any CPU
{09E236C9-E431-407C-912D-B3DE64A924F6}.Release|x86.Build.0 = Release|Any CPU
{2EABD781-C0E4-42AA-9E4A-7B415764EDBE}.Debug + MobileApps|Any CPU.ActiveCfg = Debug|Any CPU
{2EABD781-C0E4-42AA-9E4A-7B415764EDBE}.Debug + MobileApps|Any CPU.Build.0 = Debug|Any CPU
{2EABD781-C0E4-42AA-9E4A-7B415764EDBE}.Debug + MobileApps|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -1979,7 +1933,6 @@ Global
{128D16A2-1B07-4600-A898-71B328375440} = {5FAAD966-36B8-4C19-A5FA-5410DD53063D}
{3A2042E9-8B03-4F2D-A2B7-EA4BEC36340C} = {128D16A2-1B07-4600-A898-71B328375440}
{34E323E8-E706-4DF4-B916-D614FC8CFCEB} = {128D16A2-1B07-4600-A898-71B328375440}
{09E236C9-E431-407C-912D-B3DE64A924F6} = {5FAAD966-36B8-4C19-A5FA-5410DD53063D}
{2EABD781-C0E4-42AA-9E4A-7B415764EDBE} = {BCAEE9AE-8D3E-4C77-A2E4-134E1552D5F8}
{6BA6689B-2915-4EEF-9ACC-C3E968C40033} = {BCAEE9AE-8D3E-4C77-A2E4-134E1552D5F8}
{B381269F-44DA-4E46-8F51-1F1DF7D1F61D} = {5FAAD966-36B8-4C19-A5FA-5410DD53063D}
Expand Down
122 changes: 0 additions & 122 deletions build/pipeline-releasebuild-netonly.yaml

This file was deleted.

9 changes: 3 additions & 6 deletions build/platform_and_feature_flags.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNetCore)' or '$(TargetFramework)' == '$(TargetFrameworkNet6)'">
<DefineConstants>$(DefineConstants);NET_CORE;SUPPORTS_CONFIDENTIAL_CLIENT;SUPPORTS_CUSTOM_CACHE;SUPPORTS_BROKER;SUPPORTS_WIN32;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6)' or '$(TargetFramework)' == '$(TargetFrameworkNet6Win)'">
<DefineConstants>$(DefineConstants);SUPPORTS_SYSTEM_TEXT_JSON;</DefineConstants>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6)'" >
<DefineConstants>$(DefineConstants);SUPPORTS_SYSTEM_TEXT_JSON</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6)' or '$(TargetFramework)' == '$(TargetFrameworkNet6Win)' or '$(TargetFramework)' == '$(TargetFrameworkNetDesktop462)' or '$(TargetFramework)' == '$(TargetFrameworkNetStandard)'">
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6)' or '$(TargetFramework)' == '$(TargetFrameworkNetDesktop462)' or '$(TargetFramework)' == '$(TargetFrameworkNetStandard)'">
<DefineConstants>$(DefineConstants);SUPPORTS_OTEL;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6Win)'">
<DefineConstants>$(DefineConstants);NET6_WIN;SUPPORTS_CONFIDENTIAL_CLIENT;SUPPORTS_CUSTOM_CACHE;SUPPORTS_BROKER;SUPPORTS_WIN32;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkUap)' ">
<DefineConstants>$(DefineConstants);WINDOWS_APP;SUPPORTS_BROKER;SUPPORTS_CUSTOM_CACHE;IS_XAMARIN_OR_UWP</DefineConstants>
</PropertyGroup>
Expand Down
86 changes: 0 additions & 86 deletions build/template-OneBranch-releasebuild-netonly.yaml

This file was deleted.

5 changes: 1 addition & 4 deletions build/template-build-and-prep-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,7 @@ steps:
'MSIX\WPF.Package\bin\AnyCPU\Release\WPF\',
'NetCoreWinFormsWam\bin\Release\net6.0-windows10.0.17763.0\',
'NetDesktopWpf\bin\Release\',
'NetFrameworkWam\bin\Release\',
'TestBrokerApp\bin\Release\net6.0\',
'TestBrokerApp\bin\Release\net6.0-windows10.0.17763.0\',
'TestBrokerApp\bin\Release\net48\',
'NetFrameworkWam\bin\Release\',
'WAMClassLibrary\bin\Release\',
'WAMCallsIntoClassLibrary\bin\Release\');
Expand Down
11 changes: 0 additions & 11 deletions build/template-run-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,3 @@ steps:
codeCoverageEnabled: true
failOnMinTestsNotRun: true
minimumExpectedTests: '1'

- task: VSTest@2
displayName: 'Run unit tests (NET6-WIN)'
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\Microsoft.Identity.Test.Unit\bin\**\net6.0-windows\Microsoft.Identity.Test.Unit.dll'
searchFolder: '$(System.DefaultWorkingDirectory)'
runInParallel: true
codeCoverageEnabled: true
failOnMinTestsNotRun: true
minimumExpectedTests: '1'
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
using Android.App;
#endif

#if NETFRAMEWORK || NET6_WIN
#if NETFRAMEWORK
using System.Windows.Forms;
#endif

Expand Down Expand Up @@ -79,7 +79,12 @@ internal AcquireTokenInteractiveParameterBuilder WithParentActivityOrWindowFunc(

/// <summary>
/// Specifies if the public client application should used an embedded web browser
/// or the system default browser
/// or the system default browser. If the broker (WAM, Authenticator, Company Portal) is configured,
/// this setting is only used when the broker is not installed.
///
/// On .NET, including net8-windows, app developers must reference Microsoft.Identity.Client.Desktop
/// and call PublicClientApplicationBuilder.WithDesktopFeatures() to enable the embedded web browser.
///
/// </summary>
/// <param name="useEmbeddedWebView">If <c>true</c>, will use an embedded web browser,
/// otherwise will attempt to use a system web browser. The default depends on the platform:
Expand Down Expand Up @@ -223,14 +228,14 @@ private AcquireTokenInteractiveParameterBuilder WithParentObject(object parent)
Parameters.UiParent.CallerWindow = nsWindow;
}

#elif NETFRAMEWORK || NET6_WIN
#elif NETFRAMEWORK
if (parent is IWin32Window win32Window)
{
Parameters.UiParent.OwnerWindow = win32Window.Handle;
return this;
}
#endif
#if NETFRAMEWORK || NET6_WIN || NET_CORE || NETSTANDARD
#if NETFRAMEWORK || NET_CORE || NETSTANDARD

if (parent is IntPtr intPtrWindow)
{
Expand Down Expand Up @@ -277,7 +282,7 @@ public AcquireTokenInteractiveParameterBuilder WithParentActivityOrWindow(UIView
}
#endif

#if NETFRAMEWORK || NET6_WIN
#if NETFRAMEWORK
/// <summary>
/// Sets a reference to the current IWin32Window that triggers the browser to be shown.
/// Used to center the browser (embedded web view and Windows broker) that pop-up onto this window.
Expand All @@ -296,7 +301,7 @@ public AcquireTokenInteractiveParameterBuilder WithParentActivityOrWindow(IWin32
}
#endif

#if NETFRAMEWORK || NET6_WIN || NET_CORE || NETSTANDARD
#if NETFRAMEWORK || NET_CORE || NETSTANDARD

/// <summary>
/// Sets a reference to the IntPtr to a window that triggers the browser to be shown.
Expand Down
Loading

0 comments on commit 3f0348f

Please sign in to comment.