Visual Studio 2019 Development

Visual Studio Development Tips to Speed Up Development

  1. Search for text in the whole Solution:
    - Press Ctrl + Shift + F to bring up the popup window that allows you to search for a line of code.
       then pin the Window to the location you can find

  2. Enable CodeLens Feature in Visual Studio 2019:
    CodeLens allows you to turn on or off settings about Application Insights. The Visual Studio will show you how many references to the function are. This helps in making a discussion about whether you even need the function or not.
    - To enable Settings from CodeLens go to Tools = Options = Text Editor

    Visual Studio Code Lens
  3. When starting to use Visual Studio, sometimes you don't want the browser to stop debugging or detach from the process.
    - Every time you stop debugging and then refresh the browser the application stops showing because the IIS process is terminated

    - The way you solve this problem is: When debugging, don't stop debugging with a big red button (stop) instead navigate to the Debug menu and click on detach-all, this will leave the application running in the background so you can do your modification to the page and still see the changes in the browser.

    Short-Cuts in Visual Studio

  4. Ctrl + left arrow => To pad or apply formats to the code
  5. Ctrl + L => Cut the lines trailing in between code. Compacts the code together
  6. Ctrl + Space Bar => to See the properties of a DTO/POCCO object in C#
  7. Ctrl + RR => to rename every instance of the property or variable name at once
  8. Ctrl + f12 => to step into the C# Library code
  9. Highlight + Tab => to format or move code four spaces in
  10. Alt + Click + Drag => Muiltiple Code Selection
  11. Ctrl + T => to bring up a Slick Search bar that will allow you to search Fils, Words in Classes, and many more.

    Aligning the Code

  12. Tab => Select a block of code and hit "Tab" to move the code right
  13. Shift + Tab => Select a block of code and hit "Shift + Tab" to move that block of code left.


  14. When using Linq, you can use object.Any(pass in an expression) just like you would use a Were Close to check whether the query does contain any data. This can be used when you want to be sure that the query will retrieve data.
  15. cw = will automatically write Console.Writeline() code If you are developing a Console Application

© 2024 - ErnesTech - Privacy
E-Commerce Return Policy