Vakul's .NET Realm

My journey towards .NET World…

  • Details

    Vakuls MCPD Certification Vakuls MCTS Certification Author's Pic



Posts Tagged ‘VB.NET’

Visual Studio Tips & Tricks

Posted by Vakul Kumar More on January 12, 2012

Developers spend most part of the day with Visual Studio and using shortcuts and hidden features would definitely improve the productivity.

I’m presenting few tips and Tricks along with hidden features and customizations for the developers. Please add any new features in the comments section.

  • Full Screen Mode

Developers sometimes get distracted with the alerts and there is a solution for that. Alt-Shift-Enter toggles from regular view to full screen mode, so you can see a lot more code.  Windows Task bar is also hidden and definitely productive.

  • Copy/Cut a line of Code

We don’t have to select a complete line to copy or delete it, use CTRL-C/CTRL-X anywhere in the line.

  • Saving And Restoring Visual Studio Settings

Tools –> Import and Export Settings can be used to export the settings to an other machine.

Visual Studio default settings can be restored by selecting “Reset all Settings”

  • Select a rectangular area of text.

Hold Alt down and drag mouse over text area you like to select.

VSRectangular

  •  Conditional Breakpoints

If you’re debugging through a loop, waiting for something specific to happen—like a variable to have a specific value—use the Conditional Breakpoint capability. When you set a breakpoint, right-click on its red blob and choose “Condition…” in the popup menu.

VSConditionalBreakpoint

  • Use line numbering on your source code editor.

Using line numbers largely improves productivity, especially when four eyes are looking at a code and discussing it. Turn on line numbering by going to the menu Tools | Options. Look for Text Editor | All Languages | General and check the
“Line numbers” checkbox.

VSLineNumbers

  • View different parts of the same document.

Sometimes, it’s good to view different parts of the same document for reference purposes. At the very top of the scrollbar, there’s a little rectangle. Click and drag that down for two windows into the same code file. When done, simply drag back the splitter to collapse the window.

VSDifferentParts

  • See List of 10 Recent Projects in window menu, Not Just 4

On the Tools->Options->Environment, you can have Visual Studio show the 10(Maximum is 24) most recent projects you’ve opened, rather than just the most recent 4. (This also works in Microsoft Office and many other applications.)

VSRecentProjects

  • Find in Visual Studio IDE

Ctrl+F is known to all developers to find a word or string in current document, all open documents or entire project or entire solution. One other hidden option is Ctrl+Shift+F, this is helpful by listing results in a find window unlike navigating one by one in every file where the searched word/string exists.

  • Incremental Search

To incrementally search for text as being typed, first press Ctrl+i. Then type the word to be searched. Hit backspace to clear a character and enter to finish. Pressing F3 after this will work as usual, i.e. search for the next occurrence of previous search.

Ctrl+iCtrl+i works like F3.

  • Important Shortcuts in Visual Studio IDE

Ctrl+Alt+L  – Opens Solution Explorer

Ctrl+Alt+X  -   Shows Toolbox

F4 – Opens properties window

Ctrl+\+E – displays error list

Ctrl+\+T – displays tasklist

Ctrl + M + M  – Expanding and collapsing code blocks

  • Surround with code Snippet  (C#)

Snippet can be placed around a code block using shortcut CTRL+K+S.

VSSurroundCodeSnippet1

VSSurroundCodeSnippet2

  • Image library by Microsoft to use in Visual Studio applications

During the Visual Studio setup, the VS2008ImageLibrary.zip file is installed at \Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\

I will keep updating this post, please let me know if you know of any tip.

HAPPY PRODUCTIVE CODING Smile

Advertisements

Posted in Tips & Tricks | Tagged: , , , , , , , | 12 Comments »

AppFabric ebook – Free Download

Posted by Vakul Kumar More on November 2, 2011

I have been passive for quite some time and would like to be back into regular blogging.

Today,  I present an eBook which is available for free.

 The developers guide to AppFabric – October Edition. 

Alan Smith  is the author of the book and explains “The Developer’s Guide to AppFabric” is a free e-book for developers who are  exploring and leveraging the capabilities of the Azure AppFabric platform. Click here to download. You can visit here for the latest edition of the book.

Happy coding 🙂

 

Posted in ASP.NET | Tagged: , , , , , , , | Leave a Comment »

PDC 09 Sessions

Posted by Vakul Kumar More on December 19, 2009

PDC 09 is unique workshop which provided first opportunity to learn about the future of the Microsoft developer platform from the people that make it happen. PDC content covers a range of Microsoft products, services and technologies with topics that focus on clients, services, servers, developers tools, developer frameworks, programming languages, and much more

PDC speakers are often the people at Microsoft that are actually building the products and services being discussed in the sessions. PDC09 attendees had a unique opportunity not only to hear from those who are building Microsoft products and services but also to talk and interact with them throughout the event.

Using Mike Swanson’s downloader and renamer

If you’d like to download all of the keynote and session content, download a recent build of cURL (~250K), and extract it to your folder-of-choice. Then, download PDC09Downloader.zip (1.49KB) and extract the PDC09Downloader.bat file to the same folder. From a command prompt, start PDC09Downloader by passing it one of the following parameters: WMVHIGH, WMV, MP4, PPTX. Then wait. For files that aren’t available, cURL will download a file that is around 221 bytes in size (if you change the extension to .htm and open it, you’ll see that the file is simply an HTML "not found" error page).

To rename the files, first, download the PDC09 Renamer batch file (4.52KB). Then, extract the PDC09Renamer.bat file to the folder that contains your downloaded files, and from a command prompt, type PDC09Renamer WMV to rename all of the .WMV files to the full session title. By changing the parameter, you can also rename your PPTX and MP4 files.

Posted in Technical | Tagged: , , , , , , | Leave a Comment »

Debugger problem “The breakpoint will not currently be hit. No symbols have been loaded for this document”

Posted by Vakul Kumar More on June 11, 2009

I just experienced the infamous “The breakpoint will not currently be hit”. After reading several posts in various websites in reference to this issue, I found few solutions which I thought of sharing :

  • Check if the debug=”true” in your aspx page.

Debug is disable

<%@ Page Language=”C#” MasterPageFile=”~/MainMasterPage.master” AutoEventWireup=”true” CodeFile=”Facility.aspx.cs” Inherits=”_Facility” debug=”false”%>

Debug is enable

<%@ Page Language=”C#” MasterPageFile=”~/MainMasterPage.master” AutoEventWireup=”true” CodeFile=”Facility.aspx.cs” Inherits=”_Facility” debug=”true”%>

  • Removing all the references in the project and re-inserting them taking care of the version used.
    Manually deleting the bin/release and bin/debug sub-directories in every project in the solution.
    De-installing and reinstalling .net framework (any version) and VS-2005
    Taking a close look at the target platform in the projects.
    Breakpoints Should come back !!It can be caused as the .PDB and the assembly of one of the controls would  not have been referenced at the     right place, resulting in a desync between the sources and binaries.
    By re-referencing all, and killing the bin subdirs problem will be solved.
  • Goto Tools menu and select Options; check the “Show advanced build configurations” checkbox.  Now the build configurations show in the Project Properties dialog;  display will be the Project Properties dialog (Project menu/Properties).  We can now see the Configuration dropdown box.  Select “Active(Debug)” item. Check the “Define DEBUG constant” checkbox.  Rebuilt the project.  Now there is a symbols file ([project].pdb) in the current output directory. When debugged, the symbols file is loaded and breakpoints will now hit.
  • Other options than can be tried are  1).  rebuilding the application many times. 2). completely deleting and redoing it from scratch (though thats not a good idea !!  ). 3).  Check whether the .pdb file is in the same location as the DLL with the same name and time. 4). Check whether project is running on the debug version of the DLL and associated files. 5).  ensured there was only one instance of the DLL, project, etc. on the machine. 6).  right clicked on a DLL that is within the Modules window, selected Symbol Settings, selected Debugging | Symbols and manually added the directory with the .pdb file – even though confirmed that this is the default location used by the project. 7).  checked that Enable Just My Code is not selected within the Symbol Settings | Debugging | General menu. 8).  tried placing the DLL in the C:\Windows32\ directory just to see if the Modules Window would “see” it. 9).  adjusting a few other things to match suggestions regarding optimization settings, etc. 10). selecting Load DLL exports within within the Symbol Settings | Debugging | Native menu (although I am not familiar with what this may actually be doing..needs some research in the weekend); this caused most of the DLL’s in the Modules window to have a listing of Exports Loaded, but did not appear to affect my issue in any way – again my DLL is not within the Modules window.
  • Select the Solution node in your Solution Explorer… Select Properties from the context menu… Select Multiple Startup Projects…For each project you want to debug, select Start from the action drop down.

Received a comment from Eric Long with an other solution: click here .

Posted in ASP.NET, Technical | Tagged: , , , , , , , , , , , , , , , , | 26 Comments »

Microsoft Visual Studio Gallery – Products and Extensions for Visual Studio

Posted by Vakul Kumar More on June 11, 2009

Are you to looking to find products, extensions, and add-ins for Visual Studio.

 Microsoft Visual Studio Gallery

Your search ends at Microsoft Website. Microsoft is providing Gallery with

Tools  (Build, Coding, Data, Documentation, Modeling, Performance, Programming Languages, Reporting, Security, Setup & Deployment,Source Control, Team Development, Testing and  Web )

Controls (ASP.NET Controls, Silverlight Controls, Sharepoint Controls, Windows Forms Controls, WPF Controls and Framework & Libraries)

Templates (ASP.NET, Office , Mobile Device, Silverlight, SQL Server, WCF, Windows Forms, Workflow and WPF)

click here to access all the above mentioned  Tools, Controls and Templates.

Happy Coding !!!

 

 

Controls
  • ASP.NET Controls
    261
  • Silverlight Controls
    54
  • Sharepoint Controls
    36
  • Windows Forms Controls
    145
  • WPF Controls
    63
  • Framework & Libraries

Posted in Technical | Tagged: , , , , , , , , , , , , , , , , , , , | Leave a Comment »