- Uses Microsoft's Nuget package microsoft.winforms.designer.sdk (1.1.0-prerelease-preview3.22076.5).
- Uses DesignTools "server only" approach
Reading application settings fails in NET6 WinForms designer. Throws exception "Invalid URI: this hostname could not be parsed".
Steps to reproduce this bug using the MyButtonLibrary nuget package from this repo's \pack\packages folder:
- In VS2022 make a new NET6 WinForms project
- Copy \Pack\packages\MyButtonLibrary.1.0.102.nupkg to a local Nuget feed and in your NET6 WinForms project add a Nuget reference to it
- From the VS2022 tools window drag and drop MyButton control onto Form1
- Run-time test (SUCCESS): Run the app and click the MyButton control. The button text changes. This shows that application settings can be accessed at runtime.
- Stop the app to return to design mode
- Design-time hard coded test (SUCCESS): In the Form1 window right-click the MyButton control to access the design-time context menu. Select "Change button text using hard coded text - SUCCESS"
- Design-time application settings test (FAIL): In the Form1 window right-click the MyButton control to access the design-time context menu. Select "Change button text using application setting - This FAILS"
- For step 7 you may see the exception "Invalid URI: this hostname could not be parsed".