Showing posts with label VS2010. Show all posts
Showing posts with label VS2010. Show all posts

Notes from Pluralsight course "Introduction to Visual Studio 2010 - Part 2"


Introduction to Visual Studio 2010 - Part 2  importantly covers IntelliTrace & Extensions. Some interesting facts about VS from the video course -
  • You can debug a release build. Release folder can contain .pdb. PDB – Program Debug Database
  • Deploy Release version of build. Depending on the third party libraries you are using, their licensing terms  may not allow you to deploy the Debug version.
  • Build > Clean Solution throws away all the products of a prior Build. This will mean that the next build will be full build.
  • Rather than doing a Clean Solution & then Build Solution, you can directly do a Rebuild Solution
  • Look at Locals window after a breakpoint is hit for variable values. Use Watch window for specific variables
  • DataTip dimensions can be modified  
  • Ctrl + Datatip – for a transparent background, useful when you want to see code behind a datatip
  • Pin a DataTip to see variable value change dynamically inside it.It can be dragged, unpinned or closed.
  • Trivia: Codename of IntelliTrace was Historical Debugging
  • IntelliTrace is available in VS Ultimate only  
  • Saves a trace file of execution path & values of member variables
  • By default has very little performance impact
  • IntelliTrace can provide time travel & space travel (you can test a iTrace file on computers other than originating one to analyze "works on my machine" scenarios)
  • When you close VS, itrace files are gone so save it elsewhere. You can get the iTrace file's location from Tools > Options | IntelliTrace > Advanced 
  • You can open a itrace file within VS. Double click main thread in thread window to replicate scenario & start debugging on a different computer.
  • Using traces from other machines lets you share bugs with other developers or avoid "works on my machine"
  • Visual Studio Extensions can boost productivity. There are over 2400 extensions for different versions of VS on VisualStudioGallery.com
  • Use Tools > Extension Manager to enable/disable/uninstall update
  • Productivity Power Tools by Microsoft is a bundle of popular extensions that includes features that go on to become standard features in future VS versions. Some features in Pro Power Tools include -
- Highlight current line
- Auto brace completion
- Ctrl-Click Go To Definition
- Column guides (to check length of each code statement does not go beyond a specific column number)
- Quick Access (Windows Vista/7 like universal Find)

Read More

Things I learnt from the Pluralsight course "Introduction to Visual Studio 2010"

Visual Studio is a complex IDE that mostly looks simple on the surface but has a number of invisible features. In the Pluralsight video training course Introduction to Visual Studio 2010 (duration: 4h 37m), Kate Gregory does a walk-through of the useful features of Visual Studio 2010. Many of the tips also apply to VS 2008. My notes -
  • You can export & import Visual Studio settings. A whole team can identify best practices & share the same settings. 
  • .NET tab in Add Reference lists assemblies stored in the Global Assembly Cache.
  • There are 50 VS toolbars! They show up in context. 
  • To learn the names of toolbars, right click on a toolbar & the currently opened toolbars are shown in the context menu with a checkbox next to it. Check additional ones that you require to make them show up. The last option of this context menu is Customize. This can be used to add new commands to a specific toolbar. This is one way to control what commands are on each toolbar.
  • The keyboard shortcut Shift+Alt+Enter lets you go Full Screen so that you can focus on just your code.
  • VS 2010 is multi-monitor aware. Panes can be on a second or third(!) monitor.
  •  A code window can be made to float outside of VS 2010!
  • Class View is a great way to study other's code. Familiarity with the Class View and Object Browser Icons can help you grasp code faster.
  • Besides using Go To Definition (or F12 keyboard shortcut) to jump to the dependent member, you can use the Code Definition Window (View > Code Definition Window) to view dependent code in a docked window without having to navigate back & forth. 
  • The Call Hierarchy option under the View menu lists dependencies of a member. It shows who calls a specified function & what this function calls.
  • Dock the Quick find dialog box to prevent the dialog box from jumping around while you continue searching for keywords. Use the Bookmark All next to the Find Next button to conveniently move between references to the search keyword.
  • Use Ctrl+Scroll wheel (on a mouse that has it) to zoom the text in & out. This zoom trick works in browsers too.
  • Use the Zoom level dropdown in the status bar of VS 2010 to get a bird's eye view of the "shape" of the code. Once you recognize the blocks of code by their shape, you can jump to the required one with a decreased zoom level.
  • Visual Studio can not only resolve namespaces for classes that don't originally have a reference but also intelligently build method stubs (Generate > Method Stub, from the context menu) on request for a custom method that you may have declared but not defined. Like a chess player, VS is busy figuring out your moves while you are typing out your code.
  • Using the Help Library Manager (Help > Manage Help Settings), you can choose whether to invoke online help or local help. You can switch between the two whenever you like.
Related:

Read More
HOW TO use IIS 7.5 on Windows XP, Vista with Visual Studio 2010

HOW TO use IIS 7.5 on Windows XP, Vista with Visual Studio 2010

The free download IIS Express brings the IIS 7.x feature-set to Windows XP SP2+ (which comes with IIS 5) & Windows Vista (which hosts IIS 7). With the upcoming Visual Studio 2010 SP1 (a beta is now available), enabling integration with IIS Express will be easy. IIS Express will bring the best of both existing web server options in Visual Studio - ASP.NET Development Server & the native IIS.

The advantages of IIS Express paraphrased from Scott Guthrie's post -
  • IIS Express will work with VS 2010 and Visual Web Developer 2010 Express, will run on Windows XP and higher systems, does not require an administrator account, and does not require any code changes to use. 

  • It’s lightweight and easy to install (less than 10Mb download and a super quick install)

  • It does not require an administrator account to run/debug applications from Visual Studio

  • It enables a full web-server feature set – including SSL, URL Rewrite, Media Support, and all other IIS 7.x modules

  • It supports and enables the same extensibility model and web.config file settings that IIS 7.x support

  • It can be installed side-by-side with the full IIS web server as well as the ASP.NET Development Server (they do not conflict at all)

  • It works on Windows XP and higher operating systems – giving you a full IIS 7.x developer feature-set on all OS platforms

  • It does not require any registration/configuration steps.

  • In addition to supporting ASP.NET, IIS Express also supports Classic ASP and other file-types and extensions supported by IIS.

IIS Express FAQ lists more of its features:
  •  IIS Express is the Web server that is included with WebMatrix. You can also install IIS Express all by itself 

  • You can also manually launch IIS Express from the command line and use it with Visual Studio 2008, using the custom web server option. 

  • Versions 2.0, 3.0, 3.5, and 4.0 of ASP.NET framework are supported.

  • IIS 7.5 Express supports 64-bit architectures using the WoW64 subsystem. Full 64-bit support will be considered for future releases.

  • The IIS 7.5 Express license allows the MSI to be redistributed. You can include the MSI in your product or chain your installer to it. You can't distribute IIS Express in any other manner at the moment.

  •  IIS Express supports both the “Integrated” and “Classic” managed pipeline modes from IIS 7.

  • The core IIS Express runtime is xcopy-deployable. However, as of this time, xcopy deployment is not an officially supported feature.

  •  By default, only requests over localhost are serviced; however, you can modify the bindings to enable external traffic. For security reasons, you should have Administrator user rights on the machine to set this up.

  •  IIS Express does not include an FTP service. 

  • Similar to IIS, IIS Express supports multiple applications under the same site running in the same process.

  •  IIS Express support WCF applications. As noted above, WCF is only supported over HTTP or HTTPS. WCF over MSMQ and net.tcp is not supported.

  • SharePoint won’t run on IIS Express because it uses IIS features that aren’t supported.

  • IIS Express can run side-by-side with other Web servers as long as there are no conflicting bindings. 

Read More