-
May 12th, 2021, 08:29 AM
#1
Thread Starter
New Member
[RESOLVED] my.settings - Missing ApplicationSettings so unable to do bindings
Using Visual Studio Community 2019
This is more of a Visual Studio issue than a VB.NET issue.
In my project I am trying to use my.settings to retain text and backcolor of some textboxes.
I have defined the settings in Project > Project Properties > Settings.
The problem is in Properties window for the TextBoxes, ApplicationSettings is not listed so I am unable to set the PropertyBindings.
Have I missed a step?
If not, how do I access ApplicationSettings? Or can the bindings be done in my code?
-
May 12th, 2021, 08:56 AM
#2
Re: my.settings - Missing ApplicationSettings so unable to do bindings
You have created a project that targets .NET Core rather than .NET Framework. .NET 5.0 is .NET Core, although they have dropped the Core suffix from the name because that's all there is going to be going forward - .NET Framework 4.8 is the last version.
.NET Core was built from the ground up and so everything in .NET Framework had to be reimplemented. They have done just about everything but there are a few VB and Windows Forms bits and pieces that have not been done, and this is one of them. There's a fair chance that we'll see those last few pieces added with .NET 6.0 and VS 2022 but, for now, if you want that functionality then you will need to create a new project that targets .NET Framework. All the project templates that do so specify it in the name.
If you do create a new project, you should be able to drag your forms from the existing project into the new one in the Solution Explorer, rather than recreate them from scratch.
-
May 12th, 2021, 09:01 AM
#3
Thread Starter
New Member
Re: my.settings - Missing ApplicationSettings so unable to do bindings
Hahaha, just my luck !!
Thanks jmcilhinney, I'll create a new .NET 5.0 project.
-
May 12th, 2021, 09:13 AM
#4
Re: my.settings - Missing ApplicationSettings so unable to do bindings
Originally Posted by BlueCheese
I'll create a new .NET 5.0 project.
No, that's the problem in the first place. You'll create a new .NET Framework 4.8 project, if you want to use that functionality.
-
May 12th, 2021, 09:44 AM
#5
Thread Starter
New Member
Re: [RESOLVED] my.settings - Missing ApplicationSettings so unable to do bindings
Sorry, I marked this as resolved too soon.
I created a new .Net 5.0 project and copied my form components and code over. Project works.
However, I then created settings (in project > project properties), but ApplicationSettings is still not showing in the TextBox properties.
-
May 12th, 2021, 09:47 AM
#6
Thread Starter
New Member
Re: [RESOLVED] my.settings - Missing ApplicationSettings so unable to do bindings
Sorry, did,t see your reply.
I only have 2 options when creating a project : .NET 5.0 (current), and .NET Core 3.1 (Long term support)
-
May 12th, 2021, 10:13 AM
#7
Thread Starter
New Member
Re: [RESOLVED] my.settings - Missing ApplicationSettings so unable to do bindings
Sorry, it's sorted now.
Thanks for your guidance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|