Subscribe to Feed

Posts Tagged ‘Visual Studio

When you compile your windows phone app, it might build fine but throw an “unspecified error” when you try to deploy your app either onto your phone or to the emulator. The most probable reason that causes this is that there is style incompatibility in your xaml that the parser failed to resolve.
To fix the [...]

It is very easy to convert a string to stream and vice versa in .Net.
Converting String to Stream:
MemoryStream stream = new MemoryStream();
StreamWriter writer = new StreamWriter(stream);
if you already know the encoding of your string, you can also use
byte[] tempByteArray = Encoding.ASCII.GetBytes(myString);
MemoryStream stream = new MemoryStream(tempByteArray);
Converting Stream to String:
StreamReader reader = new StreamReader(stream);
stream.Position = 0;
string [...]

You may run into a situation on several occasions where in you have to generate a object file (like .cs file) from a XML file. For example, you may have a XML/SOAP response from a web service that need to be de-serialized and consumed in your application etc..
Luckily because of the tools shipped with Visual [...]

You can download the Windows Phone Developer tools from By default, only Windows Vista and Windows 7 are support. When you try to install the developer tools package you will receive an error similar to

This is because the bootstrapper included with the package is rigged to block install on the server OS’es. To [...]

In this post I will explain how to execute a .SQL script file from .Net.
One of the issues with executing a script file in .Net is that SQL script files usually contain several “GO” statements in them which .Net’s ExecuteNonQuery method does not like.
Here is how you can workaround those go statements..

Open the SQL [...]

There usually are several occasions where you might want to loop through all the controls in a container like a panel or a form etc.. looking for a particular type of control. For example, lets say you have a panel on your form which has several CheckBoxes in it, and you wish to find out [...]

On some occasions you might want to deploy the Asp.Net MVC application to avoid compiling it yourself etc. You can achieve this by following the below steps

Create an ASP.NET website project in Visual Studio
Add a reference to the System.Web.Mvc.dll (and any other DLLs that your application might need)
Copy the web.config from regular ASP.NET MVC project [...]


31 Days of Refactoring

Posted by admin as Random, Visual Studio

Take a look at this very interesting blog post series - 31 days of refactoring
The various refactoring “methods” are getting more complex and interesting as the series continues.
IMHO, This is must read for all developers.

To create a ShelveSet from command prompt in TFS, you can just use the command “TF shelve” from Visual Studio command line. This should open a UI dialog with all the pending changes in current work space. If you would like to create a shelveset with all the changes under current directory you can use [...]

Officially according to Microsoft .Net Framework 3.5 is not supported by Visual Studio 2005. I dot not know if there is a way to make the .Net FrameWork v3.5+ Asp.Net websites work with  and Visual Studio 2005, but for any other windows projects, All you have to do is make a small change in your [...]