TypeScript rename variable - visual-studio

Anders Hejlsberg shows on channel9 that you can rename variables across multiple files with the Visual Studio TypeScript plugin. cf.: video introduction to TypeScript by Anders Hejlsberg at 50:08.
However, when I open the Refactoring menu, all items are deactivated, including Rename. I'm using the latest version of VS2012 Professional. Maybe this is related to ReSharper which is installed on my system. Can anybody could confirm this as a bug or is the Rename feature still in development?
Edit since I may not post this as an answer:
ReSharper overrides some original Visual Studio menu items.
There is a checkbox at RESHARPER -> Options -> Keyboard & Menus -> Hide overriden Visual Studio menu items.
Check this and the original Refactoring menu shows up again. There is the Rename feature which is working just fine.

There are two reasons you may not be able to refactor the name in Visual Studio.
If you are running your application in debug mode, many editing features are not available
If you have a Visual Studio extension, such as Resharper, it may have overridden the Visual Studio feature in the menu, or shortcut keys. For rename, the Visual Studio shortcut is simply F2, so it shouldn't clash with the Resharper key-combination - but Resharper may still override the context menu.

ReSharper (7.1.1) doesn't have built-in rename support for TypeScript. If you have ReSharper installed it is probably overriding (and hiding) Visual Studio's native rename -- this is the default functionality.
To show and enable Visual Studio's rename you need to uncheck the following option:
RESHARPER -> Options -> Keyboard & Menus -> Hide overriden Visual
Studio menu items
(Per the comments to this post, you can vote for this feature to be added to ReSharper at the following link: http://youtrack.jetbrains.com/issue/RSRP-330454)

Related

Auto Complete Not Working In New Visual Studio 2022 For UNITY

So I have had visual studio 2019 and I used it with unity. I needed to delite it and reinstall it becouse of somthing and when I reinstalld it I installed new 2022 version. Ever since auto complete isn't working.
I have downloaded the "Game development with Unity" modifyer and selected Visual Studio Community 2022 in unity preferences but it still isn't working.
Does anyone have an idea what is wrong maby?
In the Unity Editor, select the Edit > Preferences menu. On the left, select the External Tools tab.
Select Browse... from the dropdown list.
Navigate to the C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE directory and select devenv.exe. Then select Open.
Close the Preferences dialog to complete the configuration process.
And make sure that you have Microsoft Visual Studio installed in package manager:
check this link: https://learn.microsoft.com/en-us/visualstudio/gamedev/unity/get-started/getting-started-with-visual-studio-tools-for-unity?pivots=windows
there are 2 fixes that I think will help you:
You need to enable IntelliSense by opening Tools -> Options -> Search for Intellisense, and head over to the C# Section and enable features like Show completion list after a character is typed.
For good practice, you should also install the C# packages for Visual Studio 2022.

Access settings in Visual Studio 2019

There is a lot about about changing setting in Visual Studio on stackoverflow. All of them start with go to 'File' -> 'Preferences' -> 'Settings'
Ref: Remove trailing spaces automatically or with a shortcut
But there is not 'Preferences' when I click on 'File' from top menu.
Could anyone give advise where is settings now/how to get access to them, please
Visual Studio 2019
Thanks
Visual Studio (one version of which is Visual Studio 2019) is a completely different application from Visual Studio Code. Information about one will not generally be applicable to the other.
For instance, Visual Studio Code has a "preferences" submenu in its file menu, whereas Visual Studio has most of its options available under "Tools->Options". (The preferences themselves will also be different, so this isn't just a matter of finding it in a different menu.)
Try Tools->Options, depending on what you wish to configure.

How to Active Resharper's tab on Visual Studio 2019?

I installed ReSharper successfully
but, still ReSharper was not appeared on Visual Studio's tab.
I will be glad if you can help me to fix this problem.
In VS2019, Microsoft groups all 3rd party extensions under the Extension Menu
In Visual Studio 2019 top level menus from extensions are moved to the
Extensions menu as submenus
With a 3rd party extension Extensions in Main menu you can move the entries back to main menu:
Starting from Visual Studio 2019, all extensions previously located in
the Main menu were moved into the Extensions menu. This extension
allows choosing between the new and old behavior by bringing up
selected extensions into the Main menu.
If you have correctly installed it you will find the resharper extension by clicking the Extensions -> ReSharper menu item.

How can Visual Studio shortcut keys be used in Android Studio?

I am very familiar with the Visual Studio IDE, and am new to working with Android Studio. Is there a way to configure Android Studio so that the keyboard shortcuts that I'm used to from Visual Studio can be used in Android Studio?
Yes, this is possible.
For newer Android Studio Versions
This approach works on at least Android Studio v1.3 and later (per #Dazzibao's comment)
From the menu, select File | Settings. Select the Keymap option on the left, then from the Keymaps drop-down, select "Visual Studio". The defined shortcuts are then updated to Visual Studio settings.
Further customizations are able to be made, and applied. To export these settings, from the menu, choose File | Export Settings, and then select Key Maps, select a file, and save. These can be restored via File | Import Settings in the same way.
Note: Many of the shortcut keys that I was used to using C# are not set to be the same values using this method. Try the second approach (below) if not satisfied with Android Studio's "Visual Studio" key map assignments.
For older Android Studio Versions
The same approach has been documented here for the IntelliJ IDE, and also works for Android Studio. It involves downloading a .jar settings file intended for Resharper users, and importing it into Android Studio.
Navigate to: https://github.com/hhariri/Tidbits/blob/master/resharper.jar
Click "View Raw" to download the resharper.jar file
In Android Studio, import the settings: File -> Import Settings -> <fullPathTo>/resharper.jar
Keyboard shortcuts are now as they would be in Visual Studio. For example, from the Run menu, review the debug control flow shortcuts:

How to disable Style Cop visual studio extension?

How to disable the Style Cop visual studio extension? It's not listed in Tools / Extensions or in Tools / Add-in manager
I had the same issue: I uninstalled it using Add/Remove programs and got the expected error, when I opened Visual Studio next time. Still after hiding this error message, the StyleCop entries remained in my context menus.
After some research, I found a solution to remove all remains by running devenv.exe /setup on the command prompt. You must run the console elevated and you might have to switch to the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE folder (or similar; depending on your system) in order to run the command.
Remember to remove the assotiated Code Cleanup profile if you are using ReSharper.
Source: http://stylecop.codeplex.com/discussions/257772
You can't, StyleCop deliberately hides itself from the uninstall menu in Visual Studio.
You can uninstall it in Add/Remove programs. You might get an error the next time you open Visual Studio but it will be gone after that.
why it happens is : mostly because you uninstalled the style-cop while visual studio was open
how to fix it
remove the registry keys
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\InstalledProducts\StyleCop
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\Packages{629EB7CC-69C2-43AC-9BC9-482B0F810C4E}
OR
reinstall & then uninstall (make sure your visual studio is closed during this process)
if you are using resharper
you would need to reset the Code Cleanup Profile to factory defualt to get rid of style-cop completely.
I had the same issue. I have already uninstalled it from Visual Studio by ReSharper Extension Manager and it there was under the right click menu still when I click any projects on Solution Explorer.
This way will solve the problem:
Steps:
Remove the StyleCop by Add/Remove Programs on control panel
If you have already uninstalled the StyleCop, install once again by ReSharper extension manager.(There will be many error at the first opening Visual Studio after the styleCop uninstall process. don't worry about it, press enter all)
Then Remove it by Resharper extension manager again.
I had the VS15 StyleCop plug-in installed and later added the ReSharper extension on top.
I removed the extension from ReSharper, then uninstalled StyleCop via Control Panel Add/Remove Programs and then let CCleaner run with registry clean-up.
The StyleCop entries have disappeared from the menus and the billions of squiggly lines have as well.
The easiest way is to install "StyleCop" extension from Visual Studio Marketplace. Which also can be found from the link :
https://marketplace.visualstudio.com/items?itemName=ChrisDahlberg.StyleCop
Now right click your project and click on "StyleCop Settings", there you you can disable or customize the rules.

Resources