vs2022 intellisense is evil, it just killed my coding
Looking at what it did here to a mouse enter sub, lots of screwed up code lines.
I had it OFF, then VS2022 did a major upgrade to next version, and I noticed it doing odd things when I typed in text and pasted code
And a few minutes ago, it hosed this forms code, AFAIK, it is not supposed to look like this.
Kept getting this error when starting up
Code:
System.InvalidCastException: 'Unable to cast object of type 'System.EventArgs' to type 'System.Windows.Forms.MouseEventArgs'.'
Handles Label8.MouseMove, Label8.MouseEnter
Code:
Private Sub Label8_MouseEnter(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label8.MouseMove, Label8.MouseEnter
Label8.Cursor = Cursors.Hand
End Sub
Private Sub Label9_MouseEnter(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label9.MouseMove, Label9.MouseEnter
Label9.Cursor = Cursors.Hand
End Sub
Private Sub Label10_MouseEnter(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label10.MouseMove, Label10.MouseEnter
Label10.Cursor = Cursors.Hand
End Sub
Private Sub Label11_MouseEnter(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label11.MouseMove, Label11.MouseEnter
Label11.Cursor = Cursors.Hand
I do not even recognize these subs at all!
vs2022 just added them all in by itself it seems.
Re: vs2022 intellisense is evil, it just killed my coding
Cutting all these subs out, and now program back to running again
And now I have to figure out what vs2022 messed with and try and put the pieces together again.
Code:
Private Sub Label2_MouseEnter(sender As Object, e As EventArgs) Handles Label2.MouseMove, Label2.MouseEnter
Label2.Cursor = Cursors.Hand
End Sub
Private Sub Label5_MouseEnter(ByVal Sender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label5.MouseEnter
Label5.Cursor = Cursors.Hand
End Sub
Private Sub Label6_MouseEnter(ByVal Sender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label6.MouseMove, Label6.MouseEnter
Label6.Cursor = Cursors.Hand
End Sub
Private Sub Label7_MouseEnter(ByVal Sender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label7.MouseMove, Label7.MouseEnter
Label7.Cursor = Cursors.Hand
End Sub
Private Sub Label8_MouseEnter(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label8.MouseMove, Label8.MouseEnter
Label8.Cursor = Cursors.Hand
End Sub
Private Sub Label9_MouseEnter(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label9.MouseMove, Label9.MouseEnter
Label9.Cursor = Cursors.Hand
End Sub
Private Sub Label10_MouseEnter(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label10.MouseMove, Label10.MouseEnter
Label10.Cursor = Cursors.Hand
End Sub
Private Sub Label11_MouseEnter(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.MouseEventArgs) Handles Label11.MouseMove, Label11.MouseEnter
Label11.Cursor = Cursors.Hand
End Sub
Re: vs2022 intellisense is evil, it just killed my coding
Originally Posted by PlausiblyDamp
Have you considered using some form of version control? That would make it easier to undo any changes, vs created or your own.
Git is built into VS these days so it is pretty easy to get going with it.
I got it all back working and ASFAIK disabled intelli-whatever, which is actually very dumb and troubling for me.
This is not the first time it has badly messed up my code.
It all happened super-fast. Ended up costing me about 45 minutes of bewilderment.
Went from running, I deleted am Image3 control on the form, then all code involving Image3.
Started it up, and whamo, got hit with that error message. I mean what is going on, it's like I don't know what just happened, will it ever work again?, What did I do, something crazy just happened? Then I was looking thru the code and saw that crazy sub stuff, and just had to post it here.
It's like you get this sinking feeling that it is destroyed, and you will never know what happened.
Anyhow,
When I am actively coding, I can make a lot of changes fast.
Typically, I close vs2022 and copy the entire large folder onto a flash drive after I am done for the day.
Re: vs2022 intellisense is evil, it just killed my coding
A week ago, I did make a stupid mistake.
I had been leaving the 256gb flash drive plugged in.
I was tired and started up vs2022.
Saw my project folder in windows 11 file manager and loaded it into vs2022.
Made some important changes.
Then went to back it up and first I delete the project folder on the thumb drive to copy the changes from the hard drive.
So it's deleting the thumb drive files, suddenly, says it cannot delete files in use?
Uh oh, I just deleted a whole days worth of changes! I had been running my code off the thumb drive in VS2022.
And the code changes are all gone.
Wow, that was pretty stupid of me...
Took a day to get it all back, luckily my mind recalled the things I had done and recreated the code.
So now I always unplug the thumb drive after copying on a code backup.
Re: vs2022 intellisense is evil, it just killed my coding
You should stop relying on those backups and start using source control, like every developer should. Issues will still occur from time to time but dealing with them will be much easier. The things you're complaining about have been solved for many years. They do just seem like complaints too. You haven't actually asked any questions so it doesn't seem like you're actually asking for any help. As someone who does come to try to help, it's a little annoying to read what I think will be a request for help and find that I've wasted my time on rant.
Last edited by jmcilhinney; Jun 16th, 2024 at 09:16 PM.
Re: vs2022 intellisense is evil, it just killed my coding
They are quite right in their recommendations. Use github. It will give you the granularity you need to revert changes made to your code, made by anyone/anything.
First backup your project in the way you are familiar. This is your own safety net so that you know anything you do from this point, you have the project safely stored away somewhere.
Download github desktop. Run it. Create a new repository, point it to your current code folder for the particular project you have in mind. Make it public/private repository as you will. Give it a licence if it is public. Push your project to github. Have a look at the repo. on the web and be sure it is structured as per your project.
If it is public update the readme.md
When you make a change commit it and push it to the repo. Do this one change at a time so you can back-out a complete change if you want to.
Don't do too many changes and commit lots altogether, it is a sin and you will soon learn why.
Have a look at my github link below and you will see all my individual project repositories listed, each with a readme.md kept updated. It is very little overhead, you have version control that takes you back to whenever you wish, you can clone a repo. wipe your local code and restore at any time. Your own backups to USB are unaffected but the granularity of control you will obtain will soon mean that you will stop taking backups as often as you used to.
Last edited by yereverluvinuncleber; Jun 17th, 2024 at 04:42 AM.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
We used to use that where I work too but that requires you to install a server, does it not? Unless you're really keen or concerned about privacy, a cloud-based source control provider is more convenient. Maybe there are cloud-based SVN providers that I'm not aware of. We now use Azure DevOps at work so I use that for personal stuff too. It's overkill but it's free and you can just ignore the features you don't need. It's also Git-based, so the same commands work with it as other Git providers, e.g. GitHub.
It's also worth noting that the page you linked to says that you cannot use the SVN plugins with the free versions of VS but that was written in 2012. These days, the free Community edition of VS has pretty much full support for extensions, so that's not an issue.
Re: vs2022 intellisense is evil, it just killed my coding
I know I am being stupid here.
I logged into my github account, already had one.
Went to use graphical drag drop to push files.
I was thinking the whole folder but it has 477 files for the project.
and it's 33mb, so github says that too much.
What part of a project folder are you supposed to upload?
Really would be nice to upload an entire folder to get it all. Otherwise, I suppose might have to recreate the project if say you lost everything?
Re: vs2022 intellisense is evil, it just killed my coding
Originally Posted by sdowney1
I know I am being stupid here.
I logged into my github account, already had one.
Went to use graphical drag drop to push files.
I was thinking the whole folder but it has 477 files for the project.
and it's 33mb, so github says that too much.
What part of a project folder are you supposed to upload?
Really would be nice to upload an entire folder to get it all. Otherwise, I suppose might have to recreate the project if say you lost everything?
There should be a "Git" menu item in VS2022 that you'll want to check out when you have your project open next. You'll do everything from there, and you shouldn't have to worry about manually uploading anything to github.
Re: vs2022 intellisense is evil, it just killed my coding
Originally Posted by sdowney1
I know I am being stupid here.
I logged into my github account, already had one.
Went to use graphical drag drop to push files.
I was thinking the whole folder but it has 477 files for the project.
and it's 33mb, so github says that too much.
What part of a project folder are you supposed to upload?
Really would be nice to upload an entire folder to get it all. Otherwise, I suppose might have to recreate the project if say you lost everything?
You want to exclude the bin, obj, .vs as minimum. In fact you can get VS to generate you a .gitignore file to do this automatically.
Re: vs2022 intellisense is evil, it just killed my coding
Trying to commit a burgeoning project in full to github can go over certain size limitations. Total size and individual file sizes.
The first thing I did was to restructure my program so that it used resource properly. That meant using JPEGs instead of PNGs in the documentation, I created appropriate folders for sounds, images, text &c, meaning that individual folders are all reasonable in size. I also kept all individual files to a minimal size to avoid any file limits, CHM, zip files and the like.
To get round the upload limit, you can also, for the first time of uploading, manually create folders by yourself and push the files to that folder yourself using the web interface. When all the folders exist on the repo. then github will keep the two in synch. This avoids the limits on the first big push.
Changes to accommodate github might seem onerous but it is worthwhile, github is forcing you to think about the structure of your project and to lay the resources out correctly. The facility it provides in the end is worth the effort.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: vs2022 intellisense is evil, it just killed my coding
I will research into how to use the repo, I see push and pull.
I also installed google drive desktop and told it to sync my entire vbnet projects folder with multiple projects.
It can be paused, or restart the sync. I think changes I make in vs2022, it will update google drive and if I deleted something it will delete it, and it goes both ways. But I have no plans to delete files or folders from google drive on the web.
Re: vs2022 intellisense is evil, it just killed my coding
Google's and other synching tools are always dodgy. You don't get anything for free, especially from Google. One day you will pay or they will kill/feck up the service.
Don't ever use any synching tool derived from Microsoft code, they just don't know how to do it reliably. You WILL lose data. Github is the exception but they had to buy it...
Once you have confidence in github you will turn all that synching off. A synch. can take quite a while and you never know the full and current state.
I have google drive and I synch to it once every six months. Then I turn it off as it saves a lot of CPU. I backup to USB (pronounced 'ouuusb') once per year. Github does the rest. I keep three other 'puters in step, using github to pull repo. updates down as required.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: vs2022 intellisense is evil, it just killed my coding
Originally Posted by yereverluvinuncleber
Google's and other synching tools are always dodgy. You don't get anything for free, especially from Google. One day you will pay or they will kill/feck up the service.
Don't ever use any synching tool derived from Microsoft code, they just don't know how to do it reliably. You WILL lose data. Github is the exception but they had to buy it...
Once you have confidence in github you will turn all that synching off. A synch. can take quite a while and you never know the full and current state.
I have google drive and I synch to it once every six months. Then I turn it off as it saves a lot of CPU. I backup to USB (pronounced 'ouuusb') once per year. Github does the rest. I keep three other 'puters in step, using github to pull repo. updates down as required.
yes, ok.
I can see the google drive desktop syncing automatically on the debug folder. They put up a message.
I'm reading on fetch, pull push.
Says to pull before push? confusing. I am not working with other people, it is just me.
And it seems my local repository right now is empty. If I pull will it fill up?
What happens if I pull? Will it pull from remote git repo to my local, and why would I want to do that?
I can understand push if it uploads my vs2022 app to the remote server. I don't want to pull old code, I want to push new working code changes.
Re: vs2022 intellisense is evil, it just killed my coding
That looks like you successfully committed the changes and pushed them to whatever remote git server you are using. If you are using github you should be able to see the changes via your browser.
Re: vs2022 intellisense is evil, it just killed my coding
Originally Posted by PlausiblyDamp
That looks like you successfully committed the changes and pushed them to whatever remote git server you are using. If you are using github you should be able to see the changes via your browser.
Re: vs2022 intellisense is evil, it just killed my coding
Originally Posted by jmcilhinney
We used to use that where I work too but that requires you to install a server, does it not? Unless you're really keen or concerned about privacy, a cloud-based source control provider is more convenient. Maybe there are cloud-based SVN providers that I'm not aware of. We now use Azure DevOps at work so I use that for personal stuff too. It's overkill but it's free and you can just ignore the features you don't need. It's also Git-based, so the same commands work with it as other Git providers, e.g. GitHub.
It's also worth noting that the page you linked to says that you cannot use the SVN plugins with the free versions of VS but that was written in 2012. These days, the free Community edition of VS has pretty much full support for extensions, so that's not an issue.
It has been around here for many years and it is installed all over the place (main copy and programmer versions on our laptops). We are in the process of rewriting our apps, it may be time to look at what we are using. I don't develop at home anymore.
Creating the branch essentially creates a copy of your project that is kept separate until you merge it with the main branch. This allows you to do things like fix bugs, or add features, or redesign forms without effecting the main branch.
You could create a branch called "new UI" to create a new UI for your project. Someone using your program tells you there is a run-time error occurring somewhere else. You can then create a "bug 1 fix" branch to fix that bug. You can then merge the bug 1 fix branch into the main branch. That bug is now fixed. A month later you can merge your new UI branch back into the main when you're done and you'll still have your bug fixed and then you'll have your new UI as well.
I use them at work for any new additions or sweeping changes to existing forms and code. A huge bonus is that it leaves a nice documented trail of when things were fixed or added. I use that info to roll into a "What's New?" type of form that tracks any changes or additions to our applications.
Re: vs2022 intellisense is evil, it just killed my coding
When you make changes via the web on a repo. you have to pull those down first.
When you make changes locally, you commit them, then you push them to the repo.
Forget branches at this point. You just want to use it to synchronise. One step at a time.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: vs2022 intellisense is evil, it just killed my coding
I still don't understand GIT.
I just looked at my git repo online and none of the code I have changed in vs2022 is there, nothing since I first pushed code to GIT.
I just tried a 'commit' and a 'push'. it said beginning push then faded out.
Waited a few minutes, looked at online git repo, and nothing is updated, still the original code is there from last week.
I was thinking every 'push' updated my online GIT repo, but nope.
Re: vs2022 intellisense is evil, it just killed my coding
After I tried 'commit' then push, I get this message in vs2022, but nothing in my online repo has changed that I see.
I click to view a recently changed clsElastic module, and it is the same code in it as last week.
I really do not understand, and If I don't get it, I can't use it as it is not backing up any changes that I can see.
Re: vs2022 intellisense is evil, it just killed my coding
This thread no longer has anything to do with the original subject. You really ought to start a new thread dedicated to the new subject and, if appropriate, mark this one Resolved.
Re: vs2022 intellisense is evil, it just killed my coding
Originally Posted by sdowney1
snap of what I see in GIT vs snap of what I have in vs2022, and no match
Notice at '--font, there are loads of green comments in vs2022
and at GIT, no comments at all
See that green bar on the right? That's NEW UNCOMMITTED code ... getting new code up into github is a three step process.
Step 1 - Stage the changes - This is by using "git add ./path/to/the/changed/file" or by using the git menu in VS... Should be somehting like "add" or "stage"
Step 2 - Commit the changes - Once you have added all of the changes you want, you then commit it to the local repo. "git commit" or appropriate menu option.
Step 3 - Push the changes - this syncs the remote repo with your local one. Then and only then will the changes show up in GitHub.
It looks like you're missing that critical step of adding/staging your changes prior to the commit step. That's why VS is showing the green bar. Once you stage and commit your changes, that green bar will disappear (or should) indicating it is now part of the committed code base.