Visual studio intellisense is not auto completing unity monobehaviour methods - visual-studio

I had visual studio 2019(don't know which version) and intellisense was working fine. It was suggesting every unity functions(like start, update, onTriggerEnter, etc.) as well as user defined functions.
Then there is info that Microsoft has removed its support for this version and i had to update it to 2019 v16.11.18. And now the intellisense which was previously working fine in every respect, stopped suggesting unity event functions or monobehaviour functions only. Other keywords like gameobject, transform, GetComponent or user defined functions are being suggested without any problem. Its just some those crucial monobehaviour functions which got this problem.
I have double checked external tools settings in unity as well as tools for unity option in visual studio. My visual studio is not saying miscellaneous files on top left and i have nothing more to do.
Please help me..

I think it is now fixed. What i did is open visual studio installer and click repair on my visual studio. That's it.

Related

Visual studio 2022 is not auto-completing certain methods

I have recently downloaded visual studio 2022 for use in Unity and it was working correctly for a while, but today it has stopped auto-completing certain method names such as OnMouseButtonDown() and OnTriggerEnter2D(). Other methods such as Start() and Update() do work, but a majority of Unity specific methods are no longer auto completed. I've tried restarting visual studio code, restarting my computer and uninstalling and reinstalling visual studio code, but the error still persists. Any help would be greatly appreciated. Thanks.
This problem can cause various of reasons, even some IDE bug (which Visual Studio 2022 has a large number) but there is pretty common solution for this one
Firstly you'll have to make sure, that your Game development with Unity workload is checked
So
Open Visual Studio Installer and click Modify button across your version of Visual Studio.
Click on a Workloads panel and make sure that Game development with Unity workload is checked as shown on the image
Click Modify button at the bottom right corner.
Then you need to ensure, that desired version of Visual Studio is set as a External Script Editor inside Unity engine
Open Unity
Edit -> Preferences -> External Tools
And make sure that External Script Editor set as a current version of like so
Click on Regenerate project files button and try to always open your scripts directly from Unity
Restart Unity after those steps

Visual Studio: class wizard malfunctioning

Several class wizard functions aren't working, most of which I don't need very badly, but not being able to add classes to MFC controls is a big problem. I have an MFC dialog project going on, and whenever I try to, say, add a function to a class I just get "The operation could not be completed"--not very helpful. If in the resource view I right-click on a dialog and select "Add Class..." nothing happens.
I have Microsoft Visual Studio 2005 w/SP1. I'm running WinXPHESP3 32-bit.
BTW, this project was imported from VS 6.0, so I've got a bunch of things lying around like AFX_MSG_MAP, which I'm starting to suspect is useless and maybe interfering.
Like I mentioned in comments, a repair didn't work, so I did a reinstall. That also had a few errors, but VS seems to work now. If I had to do it all over again, I might have tried reinstalling the SP1 first.

Visual Studio text editor does not recognize F# source?

I have got the following problem with F# code recently: almost the complete code is underlines with curly red lines (indicating problems) and whenever I hover with the mouse cursor over any word the pop-up appears with the message "Unexpected token". IntelliSence doesn't work either.
Nonetheless if I start the project it is executed without any problem.
This happens both to already existing F# files and to newly created F# projects. I remember it was working just 2-3 months ago!
I tried to deactivate all possible extensions but it doesn't help.
Any ideas?
I get this too. Sometimes, simply exiting and going back into VS helps. When I tweeted the problem, Don answered with this:
"do you have "python tools for visual studio alpha" installed? if so, uninstall it or apply the hot fix"
This wasn't relevant to me (as I haven't been anywhere near python) but I'm posting here in case it helps you.
-- Edit: here's a link to the patch, thanks to Alexander Galkin: http://pytools.codeplex.com/workitem/599
I haven't seen this situation before but here's a guess at why it's happening and how you might cure it.
Visual studio works on a system for plugins. Even the stuff that is "native", like the C#/F#/VB.NET project systems, are just plugins that uses the visual studio shell. It looks like the F# plugin has been damaged in someway.
If this is Visual Studio 2010:
You might try opening the visual studio installer and trying a repair installation or deactivation and reactivating the F# project system
If this is Visual Studio 2008:
You might try uninstalling and reinstalling the F# plugin

Visual Studio 2010 with phone tools - Any advanced/configurable settings?

In Visual Studio 2008, there was the device manager for setting up additional templates and options for the emulator. None of these options are available with Visual Studio 2010 which I understand as the features were removed.
When the Phone Tools are installed, the device target box comes back but there are no options at all.
Basically, I was just wondering where this list gets its options from and if there is any way at all to configure it?
The closest I got to was find the %LocalAppData%\microsoft\phone tools folder, but not sure this is correct as it appears to be more related to the emulator itself (e.g. if deleted, it gets recreated when you run.).
(Link to something a post that helped me years ago)
It took me a while, but it looks like I have found it.
I was on to the correct path with %LocalAppData%\microsoft\phone tools. All the targets are in the conman_ds_platform.xslt file.
I have no idea why they no longer provide an interface for customising - but it looks to me that despite MS taking the feature out of Visual Studio, it is still possible to customise this and add your own devices just fine.
... Next, depending on time, I will try to convert the Windows Mobile/CE project templates to VS 2010 and see if it is possible to do full development on Visual Studio 2010.

Phantom Context menu items in Visual Studio 2010

I am having an issue with my context menu in Visual Studio 2010 that is driving me nuts. I think it started when I installed the Code Snippet Designer Extent ion but I am not 100% sure about that. I didn't notice it until after I uninstalled that extension with a few others.
I have tried reinstalling and then uninstalling the extension again but that didn't work either. I am left with these extensions on my machine DevExpress Tools, Dpack, PowerCommands for VS, Productivity Power Tools and the VS10x Code Marker.
I have another system that has all the same extensions installed but doesn't have the context menu problem and I never loaded the Snippet Designer on that machine, which is why I think the problem was caused by something in that particular extension.
Here is what it looks like.
http://www.mydatafish.com/contextmenu.png I tried to post a picture but I need more points to do so and it is hard to explain without a picture so please take a look at the link.
Anybody have any ideas of how I can remove these phantom mene items? By the way I did try resetting the context mene through the the customize menu item in the Tools menu.
OK I am not sure how it got in the condition that it was but I found the program that was causing the problem. It was something called "Code Helper" and it was an add it that I used with VS 2005. It was listed as a AddIn for Visual Studio 2010 but wasn't inside the Addin directory for 2010.
To get rid of the problem I removed the program from the Programs and Features (Add/Remove).

Resources