-
Notifications
You must be signed in to change notification settings - Fork 9
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
Upgrade to net6.0 on Windows #154
Conversation
Seems like changing csproj file doesn't trigger dotnet tests. Should we add it? |
IWA and Broker still work, but Web mode is now broken. @bgavrilMS is there a way to explicitly do system web browser and not embedded web browser? EDIT: This is due to Assembly trimming. I'll have to add some trimming hints. |
@goagain we do already have |
@kyle-rader To use OS browser add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested all modes on Windows and Mac.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested all modes on Windows
Problem
net5.0 has now passed end of life. Our Mac and Linux builds are already on net6.0 but the Windows build has remained on net5.0-windows10.xxx to maintain current WAM support.
Problem 2
MSAL.NET has not yet added a net6-windows target and it will check this target at runtime and fail if you aren't using that version.
Workaround
We can target a new windows specific TFM (Target Framework Moniker) to build our Windows version of AzureAuth with net6 but manually use use the net5.0-windows10.xxx version of the MSAL.NET dll (
Microsoft.Identity.Client.dll
).This works by updating our
PackageReference
to generate the specialPkgPACKAGE_NAME
varaibles (which we use heavily in Office) and then create a separate reference tag for MSAL where we point explicitly to the DLL in the package we want to use for that namespace.Trimming and Testing
To help fully test I added publish scripts for both mac and windows (these work on both arm and intel macs + windows).
This is helpful because they build in release mode, publish, and trim - just like our CI. So the output in
./dist
is the actual binary, (unsigned) we would be shipping. This helped uncover new trimming errors, and lead to adding 2 AssemblyRoots to ensure those Dlls are not trimmed away. This is only needed for the Windows build.Testing
arm64
and Intel `x86_64)