[Settings] Decouple Settings.UI.Library from PowerDisplay.Lib to fix …#46325
Merged
[Settings] Decouple Settings.UI.Library from PowerDisplay.Lib to fix …#46325
Conversation
| <ProjectReference Include="..\..\..\common\ManagedCsWin32\ManagedCsWin32.csproj" /> | ||
| <ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" /> | ||
| </ItemGroup> | ||
| <Import Project="..\PowerDisplay.Models\PowerDisplay.Models.projitems" Label="Shared" /> |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
| @@ -0,0 +1,15 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
Check failure
Code scanning / check-spelling
Check File Path
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
| <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" /> | ||
| <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" /> | ||
| <Import Project="PowerDisplay.Models.projitems" Label="Shared" /> |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
| <ProjectReference Include="..\..\modules\powerdisplay\PowerDisplay.Lib\PowerDisplay.Lib.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <Import Project="..\..\modules\powerdisplay\PowerDisplay.Models\PowerDisplay.Models.projitems" Label="Shared" /> |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
…PowerToys Run crash PowerToys Run crashes with FileNotFoundException for PowerDisplay.Lib.dll because SettingsSerializationContext registers PowerDisplay.Lib types, forcing the runtime to load the assembly even when not needed. - Add local copies of ColorPresetItem and CustomVcpValueMapping in Settings.UI.Library (namespace Microsoft.PowerToys.Settings.UI.Library) to avoid dependency on PowerDisplay.Lib - Remove Settings.UI.Library ProjectReference to PowerDisplay.Lib - Remove unused PowerDisplay profile type registrations from SettingsSerializationContext (they use their own ProfileSerializationContext) - Inline ColorTemperatureHelper logic in MonitorInfo.cs - Add using alias in Settings.UI to disambiguate CustomVcpValueMapping types Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
lei9444
approved these changes
Mar 24, 2026
Contributor
Author
|
This is a temp fix for 0.98 crash issue. Will put more effort later to make codebase more maintainable |
This was referenced Mar 24, 2026
Closed
zateutsch
added a commit
that referenced
this pull request
Mar 25, 2026
Cherry-picked commits: - Make KBM Editor pinnable (#46482) - CmdPal: Fix missing primary context command for late-bound items (#46131) - CmdPal: Ensure DockWindow property cleans up after itself (#46303) - CmdPal: Hotfix commonCallbacks array initial count to prevent negative number (#46215) - CmdPal: Fix missing app context menu actions on the main page (#46293) - CmdPal: Fix dock popup XamlRoot handling on DockControl (#46305) - CmdPal: Reduce DockWindow backdrop switching and visual artifacts (#46309) - Always On Top: The opacity should be able to configure the hotkey individually (#46410) - [OOBE] Ensure the Settings button on the SCOOBE page opens Home, not a blank page (#46203) - CmdPal: Fix scroller scrolling and down glyph (#46447) - [Settings] Decouple Settings.UI.Library from PowerDisplay.Lib to fix (#46325)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Fixes PowerToys Run crash (
FileNotFoundExceptionforPowerDisplay.Lib.dll) caused bySettings.UI.Libraryhaving a transitive dependency onPowerDisplay.Lib.SettingsSerializationContextregistered PowerDisplay profile types (PowerDisplayProfile,PowerDisplayProfiles,ProfileMonitorSetting) via[JsonSerializable]attributes, which forced the CLR to loadPowerDisplay.Lib.dllat startup. PowerToys Run depends onSettings.UI.Librarybut does not shipPowerDisplay.Lib.dll, causing the crash.PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed