-
Notifications
You must be signed in to change notification settings - Fork 389
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
Make Settings usable in .NET scenarios #7647
Conversation
* Pin configuration type names to the desktop identities so not only we can create necessary configuration sections and serialize data, but also that we can deserialize those as well. Affected types: - System.Configuration.ApplicationSettingsGroup - System.Configuration.ClientSettingsSection - System.Configuration.UserSettingsGroup Fixes #6784 Resolves dotnet/winforms#4308 * Remove ability to browse and serialize arbitrary types, and restrict the set of type to the the known list Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1388857/
src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsDesignerView.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsTypeCache.vb
Outdated
Show resolved
Hide resolved
This seems like a very reasonable approach to get the designer basically functional for Dev17.0 as we look into more general solutions for 17.1. @RussKie Did you test with a project that multi-targets to both .NET Framework and .NET Core (e.g. .NET Framework 4.7.2 and .NET Core 5.0)? If so, did you test with different orderings of items in
and
There are, unfortunately, times when the order matters. :-( Also, did you verify this still works with a non-SDK-style project targeting .NET Framework? |
This is really cool! Also @KathleenDollard FYI! |
Yeah, that's a frequent problem for designer users. We can only display one designer at a time - so when a .NET Framework TFM is loaded, we are only working with the .NET Framework designer and everything builds etc as it did before. I would definitely want to check that the .NET Framework stuff isn't impacted, though it shouldn't be. We should check that also for CSProj, good call. |
No, forgot about this. Will check 👍
Yes, .NET Framework C# 4.0 (Console). No observable changes. |
…peCache.vb Co-authored-by: Tom Meschter <[email protected]>
…signerView.vb Co-authored-by: Tom Meschter <[email protected]>
I've created more test apps including those targeting .NET Framework 2.0, 3.5, 4.0, 4.7.2, .NET Core 3.1, .NET 5.0 and 6.0. As well as MT scenarios (e.g. Test solution: ProjectSystemTestHarness.zip The only unexpected behaviour I observed was that for There's probably a bug, but I guess this scenario is probably in the realms of unsupported edge cases. |
Merging. FYI @RussKie @merriemcgaw @jjmew We'll need to take this through M2 approval and possibly QB approval. |
Thank you 🎉 |
@Pilchie as FYI in case I'm still oof sick tomorrow. |
So, did this make it into 17.0 yet, or do we still need another bug/PR here? |
@Pilchie This was merged into main on Oct 1st. Main (at that point) was still for 17.0 changes, so these changes should be in 17.0. Insertion here: https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/355436 |
Thanks for confirming! |
Changes
Pin configuration type names to the desktop identities so not only we can create necessary configuration sections and serialize data, but also that we can deserialize those as well.
Affected types:
System.Configuration.ApplicationSettingsGroup
System.Configuration.ClientSettingsSection
System.Configuration.UserSettingsGroup
Fixes Updating the Default Settings file in a WinForms .NET 5 Visual Basic app fails. #6784
Resolves Error when trying to create Settings file (VB.Net) winforms#4308
Remove ability to browse and serialize arbitrary types, and restrict the set of type to the the known list
Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1388857/
Tests
Manual using a multi-project solution including
settings400.mp4
/cc: @dotnet/dotnet-winforms
Microsoft Reviewers: Open in CodeFlow