Web Search – Visual Studio Plugin for Integrated Search Options in IDE

As a developer we often search some thing in Internet search engines or in favourite blogs. If you are working with Visual Studio then the search might be related to an exception, keyword, referenced items or any text that is in any code file.

I have published a Visual Studio plugin to do the same kind of activity inside the IDE.

Search anything from Visual Studio IDE using Web Search Plugin\Addin

Web Search

The plugin supports below options,

  • Multiple search options included in all Text Editor, Reference Items, Error List. (Integrated search options for Visual Studio IDE)
  • Currently this Add-in works fine with Visual Studio 2005, 2008, 2010, 2012.
  • You can customize web-search by configure option.
  • Open Search in Default Web Browser or Visual Studio Tab or any other installed browser.
  • Change WebSearch context menu position
  • Easy access with Shortcut key. I use Alt+F1.
  • WebSearch context menu availabe in all most all editor files.
  • WebSearch menu also availabe in Tools menu with default search option.
  • Configurable shortcut key.
  • WebSearch menu in Tools menu
  • WebSearch context menu in all Text Editor, Reference Items, Error List.

Click here to read more from Visual Studio Gallery. Interested in creating something like this then you might wanted to check WebSearch on the Code Project

Click here to DownloadVisual Studio Plugin Addin

Very useful and handy String constructor, String(Char, Int32)

String Constructor - strings of repeated charachterWe all work with string values in our daily programming life. Sometimes we might require a string variable to be initialized with strings of a repeated character.

Now let us come to the point.

.NET Framework String class already have a parameterized constructor to do the same.

String Constructor (Char, Int32)

C# Syntax:

public String(
 char c,
 int count

MSDN: “Initializes a new instance of the String class to the value indicated by a specified Unicode character repeated a specified number of times.”

See the sample usage given below,

class Program
	static void Main(string[] args)
		int size = 10;

		string sample = new String('-', size);



		//Outputs : ----------

This is the most straightforward and efficient way to initialize a string variable with strings of repeated characters.

Visual Studio 2013 Update 1 Now Available

VS_Purp256_rgb-1[1]Microsoft released Visual Studio 2013 Update 1 on January 20, 2014. Visual Studio 2013 updates are cumulative releases that include the new features and fixes, this update fixed various issues.

For information about the latest update, see Visual Studio Updates and the Visual Studio Update KB article.

How to install Visual Studio 2013 Update 1?

You can download Visual Studio 2013 Update 1 from the below mentioned Microsoft server links,

Note: Microsoft scanned this file for viruses and claims to be virus free.

In case if you have used Web Installer then the computer must be connected to the Internet while Installing.

If you want to create an offline installer from web installer of the update then, once the web installer download is complete, open a command prompt, navigate to the download location, and run VS2013.1.exe /layout. Then specify where to download the files and click the Download button. Once downloaded, you can run VS2013.1.exe from the download location to install the update.

System.InvalidOperationException: There is an error in XML document (line, column)

Have you ever received this error, If yes then you must had a tough time to identify the actual issue.

When we Deserialize(), If the XML is not valid or if there is any mismatch in expected name or data type then we will be getting  an error message like below,

System.InvalidOperationException: There is an error in XML document (<line>, <column>).

In this case the InnerException is not that much helpful to identify the root cause.

So how do we Identify the actual issue, Here we go.

Just enable the diagnostic switch for  XmlSerialization.Compilation in config file. Once you do that then you can easily debug the generated file.

<?xml version="1.0" encoding="utf-8" ?>
 <add name="XmlSerialization.Compilation" value="1" />