Monday, July 11, 2011

How to Rename projects in Visual Studio

I was trying to rename some of the sample visual studio projects on my laptop. Though it looked like a trivial operation, soon I realized that there is so much more to it than what meets the eye. I am putting together what I gathered below so that someone might profit out of it. So here are the steps:

1.       Make sure that the solution that contains the project (to be renamed) is compiling error free.
2.       Rename the Project by pressing “F2” (or using rename context menu) in the Solution Explorer.
3.       Rename the Assembly name and Default namespace in the Project property(Alt + Enter on project in the solution tree) -> Application tab.
4.       Use Refactor -> Rename context menu(or F2) to rename any classes, if applicable
5.       Find and replace the old name with the new name (where ever applicable) in the whole solution.  This will take care of changes required in AssemblyInfo, comments (xml, user comments), configuration files, namespaces etc.
6.       Rename the windows folder, where the project physically resides to match the new namespace or assembly name. (this is often missed)
7.       Rebuild and ensure that the solution is compiling properly, if not fix all errors.
8.       Do a clean at the solution level to remove all the dlls with old names.
9.       From the root directory of the project do a windows content search on the old project name.
a.       If the search result returns dlls,pdbs, FileListAbsolute.txt  then delete them, otherwise do the necessary fix.

Feel free to throw in your suggestions and additions/corrections.

Praveen

Sunday, November 28, 2010

MS word space between lines issue

Here is how you can fix it in word

1. Switch to "Home" tab if you already are not there.
2. Look for the ribbon frame named "Paragraph".
3. In here you will find an icon with arrows pointing up and down, clicking it will open up a drop down menu with numbers like 1.0, 1.15 etc.
4. Look for the item "Line spacing options".
5. Clicking "Line spacing options" will pop up the "Paragraph" dialog.
6. Go to the "spacing" section, there you will find 2 text boxes labelled "Before" and "After" make both of them to "0 pt"
7. Press "Ok" and you are done.

Wednesday, September 8, 2010

The easiest way to send stuff to the “Send To” menu

We all know that using the Send To right click menu option, we can quickly send a file to different locations. Now if you look at the Microsoft page on “How to Add Items to the "Send To" Menu in Windows XP” (http://support.microsoft.com/kb/310270) there are quite a few steps you need to do before you can set up a new SendTo item, most importantly you need to do this each time you want to add a new option.

Here is how you could turn the SendTo feature around on itself and send targets to the SendTo option using the SendTo menu itself. The SendTo feature works by maintaining shortcuts for every target location in a “SendTo” folder. This folder could be different for different versions of the windows OS.
Eg:- The SendTo folder for XP can be reached by typing “SendTo” in the run prompt. To navigate to the “SendTo” folder in Vista the command to be typed in the run prompt is “%APPDATA%\Microsoft\Windows\SendTo”
So once you find out the SendTo folder corresponding to your OS you can achieve the sent to SendTo option in just 2 steps.
1. Create a short cut for the Send To folder. This can be done by right clicking on the SendTo folder and choosing the “Create Shortcut” option. Name this short cut “Send to SendTo”.
2. Copy the shortcut created above into the “SendTo” folder.

Now each time you right click on an explorer item you can see an additional option in the “SendTo” menu

How to make the best use of this?
The good news is that SendTo can be used to send files to application as well. So if you want to have a SendTo option to send a file to the Acrobat reader:
1. Create a shortcut to the Acrobat reader.
2. Right click on the shortcut created above and choose Send To -> Send to SendTo.
After this your send to option will have an addition option to send a file to the Acrobat reader.

Monday, September 6, 2010

How to save a mail in outlook web access

The outlook web access doesn't give a direct way to save an email. Here is a tweak
1. Double click the email you want to save in outlook mail list.
2. This will open the mail in a separate window, it has all sorts of options in the top bar of the windows, sans a save button.
3. Click the print button from the top bar.
4. This will open the mail in a printer friendly manner in a separate window, on top of this window a print dialog will pop up.
5. Cancel the “Print dialog”.
6. This doesn't close the printer friendly browser window with the html version of the email. Now choose "save as" from the "File" menu from this window.
7. Browse to a location and save your email under what ever file name you want.