Jack @ ASP.NET

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries for the ‘Visual Studio’ Category

BizTalk Server 2010, Try Developer Edition For Free

Microsoft has just released BizTalk Server 2010, and it is now generally available! Along with this release comes an updated licensing structure  that will be a relief for consultants, and companies managing multiple BizTalk environments. While the cost of the Enterprise edition has increased, the cost of the Developer edition has been eliminated. The Developer edition includes the full capabilities of the Enterprise edition, with the limitation being only that you cannot use it in production.

One of the features, that will stand out the most as you open up Visual Studio 2010 to create your first new BizTalk Server 2010 project, is the new and improved BizTalk Mapper. New features include:

    * Ability to search a map for a given schema node, or functoid
    * Ability to cut, copy, and paste functoids and links between maps and pages
    * Cleaner display of map links based on how related they are to schema nodes within the view
    * Automatic highlighting of links and functoids related to the active selection
    * Automatic scrolling into view of links and functoids related to the active selection
    * Simplified configuration UI for functoids (e.g., the scripting functoid has a single tabbed window with which you can fully configure the connections and the script)
    * Indicative match functionality that suggests nodes to link

Visual Studio 2010 Productivity Power Tools

A set of extensions to Visual Studio Professional (and above) which improves developer productivity. In this second major release of the Power Tools we have added the following four extensions:
Tools Options Support
The number one feature request by far has been the ability to turn off the individual extensions in the Productivity Power Tools.  In this release, we’ve added an extension which adds a category to Tools Options which allows you to toggle the extensions on/off and provides a single place to find the options for a particular extension.

Auto Brace Completion
Automatic Brace Completion improves the productivity of writing code by automatically inserting the closing code construct when the opening construct is typed for VB & C#.  More specifically, this extension:

  • Supports the following constructs: (), {}, [], <>, “”, and ‘’. 
  • Allows you to press <TAB> to navigate past the next enclosing brace
  • Allows you to automatically complete a statement in C# by inserting the closing semi-colon and moving you to the next line with SHIFT + ENTER

Triple Click

It’s never been easier to select a line of code from the mouse by simple triple-clicking anywhere on the line. 

Fix Mixed Tabs
Some developers prefer tabs, others prefer spaces, and nobody likes mixing tabs & spaces.  This extension promotes developer harmony by warning as they are open or save a file that has a mixture of tabs & spaces.  The information bar also provides an easy way to fix the file to suit your preference. 

Ctrl + Click Go To Definition
This extension gives the editor a web browser by adding clickable hyperlinks to symbols in your code as you hold down the Ctrl key.

Move Line Up/Down Commands
This extension maps the Alt+Up Arrow & Alt+Down Arrow keys such that they will move the current line of code or the selected lines up and down through the editor. 

Column Guides
Since Visual Studio 2002, there has been a not so secret registry key which allowed user to draw a vertical line in the code editor.  This is very useful to remind developers that their full line of code or comments may not fit one a single screen. Thanks to this extension this feature has returned with UI configure it.  Simply place the cursor at the appropriate column and select Add Guideline from the context menu ?

Colorized Parameter Help
This extension improves consistency with the editor by applying syntax highlighting to the contents of the Parameter Help window for C# &VB.
Please note: Syntax highlighting colors can be customized using the display items prefixed with “Signature Help” in the “Fonts and Colors” menu.

Visual Studio 2010 Pro Power Tools, It Is Free!

A set of extensions to Visual Studio Professional (and above) which improves developer productivity.

  • Searchable Add Reference Dialog
    The new Add Reference dialog makes it faster and easier for you to find the reference that you are looking for and add it to your VB, C# or F# project.  From the Solution Explorer, simply right click on the References node, select the Add Reference command to see the updated Add Reference Dialog. 
  • Highlight Current Line
    As the resolution of monitors increases, it’s becoming more difficult to find the caret in the code editor.  The highlight current line extension makes it easy to find the caret by highlighting the line that the caret is on in the editor.  You can even configure the default colour by changing the setting for “Current Line (Extension)” and “Current Line Inactive (Extension)” in Tools Options Fonts & Colors. 
  • HTML Copy
    This extension provides support for the HTML Clipboard format when copying code from the editor.  This means that you’ll no longer have to go fix up the formatting of your code when you paste it into a TFS bug form or any other HTML based control. 
  • Triple Click
    It’s never been easier to select a line of code from the mouse by simple triple-clicking anywhere on the line. 
  • Fix Mixed Tabs
    Some developers prefer tabs, others prefer spaces, and nobody likes mixing tabs & spaces.  This extension promotes developer harmony by warning as they are open or save a file that has a mixture of tabs & spaces.  The information bar also provides an easy way to fix the file to suit your preference. 
  • Ctrl + Click Go To Definition
    This extension gives the editor a web browser by adding clickable hyperlinks to symbols in your code as you hold down the Ctrl key.
  • Colorized Parameter Help
    This extension improves consistency with the editor by applying syntax highlighting to the contents of the Parameter Help window for C# &VB. 
  • Move Line Up/Down Commands
    This extension maps the Alt+Up Arrow & Alt+Down Arrow keys such that they will move the current line of code or the selected lines up and down through the editor. 
  • Column Guides
    Since Visual Studio 2002, there has been a not so secret registry key which allowed user to draw a vertical line in the code editor.  This is very useful to remind developers that their full line of code or comments may not fit one a single screen. Thanks to this extension this feature has returned with UI configure it.  Simply place the cursor at the appropriate column and select Add Guideline from the context menu

Box Selection with Visual Studio 2010

Box selection is a feature that has been in Visual Studio for awhile (although not many people knew about it).  It allows you to select a rectangular region of text within the code editor by holding down the Alt key while selecting the text region with the mouse.  With VS 2008 you could then copy or delete the selected text.

VS 2010 now enables several more capabilities with box selection including:

  • Text Insertion: Typing with box selection now allows you to insert new text into every selected line
  • Paste/Replace: You can now paste the contents of one box selection into another and have the content flow correctly
  • Zero-Length Boxes: You can now make a vertical selection zero characters wide to create a multi-line insert point for new or copied text

These capabilities can be very useful in a variety of scenarios.  Some example scenarios: change access modifiers (private->public), adding comments to multiple lines, setting fields, or grouping multiple statements together.

A cool Visual Studio 2010 feature

Upgrade or Uninstall of Office 2007 might cause VS 2008 Web designer to hang

On machines with a 64-bit OS, uninstall of Office 2007 will break the VS 2008 web designer.  You will find that the VS designer won’t be able to load, and any attempts to switch to Design View will hang the product.  Note that 32-bit machines are not affected and neither are other VS releases.

The root cause of this problem is that Office 2007 and the VS 2008 web designer both share a component, 32-bit MSXML5.  When Office 2007 uninstalls or gets upgraded, MSXML5 is removed yet Visual Studio still needs it.

If you are affected by this issue, there are workarounds where you may not have to completely reinstall Visual Studio.  However, the steps are different depending on how Office 2007 got removed (uninstall vs. upgrade to Office 2010) and also if you have VWD Express or a full product.

Workaround if you manually uninstalled Office 2007 (i.e. Add/Remove Programs) AND have a non-Express version of VS 2008:

  1. Go to Add/Remove Programs
  2. Uninstall “Microsoft Visual Studio Web Authoring Component
  3. Reinstall “Microsoft Visual Studio Web Authoring Component” -
    • You will need the VS install media: the product DVD or mount an ISO image
    • Go to WCU\WebDesignerCore folder and run WebDesignerCore.exe.
    • Setup does not have UI, so please simply wait about 5 minutes or watch msiexec activity in the Task Manager.
    • Verify that Microsoft Visual Studio Web Authoring Component reappears in Add/Remove Programs.
    • WebDesignerCore.exe installs RTM version.
  4. If your VS 2008 has been updated to SP1, you have to reinstall SP1 to update the Web Authoring Component you installed in Step 3.

Workaround if you manually uninstalled Office 2007 (i.e. Add/Remove Programs) AND have Visual Web Developer Express 2008:

  1. Go to Add/Remove Programs  
  2. Uninstall “Microsoft Visual Studio Web Authoring Component
  3. Reinstall Visual Web Developer Express 2008/SP1
    (SP1 for Express is not a separate install thus the need to reinstall the entire product)

ASP.NET 4 and Visual Studio 2010 Released

ASP.NET 4 and Visual Studio 2010 are now available. ASP.NET 4 and Visual Studio 2010 include lots of new features and improvements that enable you to easily build, deploy and manage great Web sites and applications.

Everything You Need to Build Better Websites

Visual Studio 2010

Visual Studio 2010 makes it easier to edit, search, and navigate code. Improved VB and C# Intellisense makes it even easier to find and use classes within the .NET Framework. Improved JavaScript IntelliSense enables better AJAX development. New code navigation and visualization features enable you to quickly find and navigate large projects and visualize dependencies across your code-base. Improved unit testing, debugging and profiling help support building robust applications.

ASP.NET Web Forms
With ASP.NET 4, Web Forms controls now render clean, semantically correct, and CSS friendly HTML markup. Built-in URL routing functionality allows you to expose clean, search engine friendly, URLs and increase the traffic to your Website. ViewState within applications is smaller and can now be more easily controlled. And more controls, including rich charting and data controls, are now built-into ASP.NET 4 and enable you to build applications even faster.

ASP.NET MVC
ASP.NET MVC 2 is now built-into VS 2010 and ASP.NET 4, and provides a great way to build web sites and applications using a model-view-controller based pattern. ASP.NET MVC 2 adds features to easily enable client and server validation logic, provides new strongly-typed HTML and UI-scaffolding helper methods, enables more modular/reusable applications, and facilitates a clean unit testing and TDD workflow with Visual Studio 2010.

Web Deployment
Visual Studio 2010 makes deploying your Websites easy. You can now publish your Websites and applications to a staging or production server from within Visual Studio itself. Visual Studio 2010 makes it easy to transfer all your files, code, configuration, database schema and data in one complete package. VS 2010 also makes it easy to manage separate web.config configuration files settings depending upon whether you are in debug, release, staging or production modes.