Dec 6, 2006

Changing the default Source Control Provider in VS.Net

To change back to VSS from Clearcase:

In the registry there is are two keys
1) HKEY_LOCAL_MACHINE\SOFTWARE\SourceCodeControlProvider

and
2) HKEY_LOCAL_MACHINE\SOFTWARE\SourceCodeControlProvider\Inst alledSCCProviders

In the key #2 you should see two entries:
ClearCase=Software\Atria\ClearCase and Microsoft Visual SourceSafe=Software\Microsoft\SourceSafe

What you need to do is delete the "ClearCase" value, so that only the "Microsoft Visual SourceSafe" is left.

In key #1, make sure that the ProviderRegKey is set to "Software\Microsoft\Visual SourceSafe".


Alternatively, just register the ssscc.dll in your C:\Program Files\Microsoft Visual Studio\VSS\win32 with the regsvr32.exe tool and the Default Source Control Provider will change back to VSS.

And thats it!

Nov 5, 2006

ASP.NET Side-by-Side Execution of .NET Framework 1.0 and 1.1

In ASP.NET, applications are said to be running side by side when they are installed on the same computer, but use different versions of the .NET Framework. The following topic describes how to configure ASP.NET applications for side-by-side execution and provides detailed steps to:

Traditionally, when a component or application is updated on a computer, the older version is removed and replaced with the newer version. If the new version is not compatible with the previous version, this usually breaks other applications that use the component or application. The .NET Framework provides support for side-by-side execution, which allows multiple versions of an assembly or application to be installed on the same computer at the same time. Because multiple versions can be installed simultaneously, managed applications can select which version to use without affecting applications that use a different version.

By default, during the installation of the .NET Framework version 1.1, all existing ASP.NET applications are automatically reconfigured to use the latest version of the .NET Framework. If you do not want your ASP.NET applications to default to .NET Framework 1.1, click here to learn how to prevent this during installation.

If you update your Web server to .NET Framework 1.1 and want one or more Web applications to run .NET Framework 1.0, you need to update the Internet Information Services (IIS) Script Map. The script mapping is the mechanism to map the .aspx file extension for a specific Web application to a version of the .NET Framework. Click here to learn how to map a Web application to a specific version of the .NET Framework.

You can use the Internet Information Manger or the ASP.NET IIS Registration Tool (Aspnet_regiis.exe) to find which .NET Framework version is running a particular Web application. Click here to learn how to find the version of the .NET Framework that a Web site is using.

One import consideration when migrating to .NET Framework 1.1 is that each version of the .NET Framework uses its own Machine.config file. As a result, if a Web administrator has made changes to the Machine.config file, those changes must be migrated to the .NET Framework 1.1 Machine.config file.

Maintaining your Web application’s mapping to .NET Framework 1.0 during installation
By default, all existing ASP.NET applications are automatically reconfigured during installation to use the newer version of the .NET Framework. Using the newer version of the .NET Framework, applications can take full advantage of improvements and new features included in the new release. At the same time, the Web administrator, who might want granular control over which applications are updated, can prevent the automatic remapping of all existing ASP.NET applications during installation of the .NET Framework.

To prevent the automatic remapping of the entire ASP.NET application to the newer version of the .NET Framework, the Web administrator can use the /noaspupgrade command-line option with the Dotnetfx.exe setup program.

To prevent total remapping of ASP.NET application to newer version
  1. Go to Start.
  2. Click on run.
  3. Type cmd.
  4. Click OK.




  5. From the command prompt, type the following line to start the installation of the .NET Framework: Dotnetfx.exe /c:"install /noaspupgrade”.




  6. Click Yes in the Microsoft .NET Framework 1.1 Setup. This will start the setup process of the .NET Framework 1.1.




Map a Web application to a specific version of the .NET Framework
Each version of the .NET Framework includes a version of the ASP.NET IIS Registration Tool (Aspnet_regiis.exe). This tool enables administrators to specify that a Web application be run under a particular version of the .NET Framework. This is referred to as mapping a Web application to a version of the .NET Framework. Administrators must select the Aspnet_regiis.exe that corresponds to the version of the .NET Framework that will be associated with the Web application. For example, an administrator who wants to specify that a Web site use .NET Framework 1.1 must use the Aspnet_regiis.exe that comes with .NET Framework 1.1.

The Aspnet_regiis.exe for version 1.0 is located at:

  • C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis

The Aspnet_regiis.exe for version 1,1 is located at:

  • C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis

The Aspnet_regiis.exe provides two options for script mapping a Web application:

  • –s sets the script map in the path and in its child directories.
  • –sn sets the script map in the path only.

The path defines the Web application IIS metadata path, which is defined in the form of W3SVC/ROOT/{WebSiteNumber}/{Application_Name}. For example, for a Web application called Portal located under the default Web site, the metabase path is W3SVC/1/ROOT/Portal.


Note You can also use a tool called the Metabase Editor to get the metabase path. You can download this tool from the Microsoft Support site at http://support.microsoft.com/default.aspx?scid=kb;en-us;232068.
  • Run Aspnet_regiis.exe –s W3SVC/1/ROOT/Portal to update the portal IIS script map and its subapplication.




  • Run Aspnet_regiis.exe –sn W3SVC/1/ROOT/Portal to update the portal IIS script map, without affecting applications in the portal’s subdirectories.




Find the .NET Framework version that a Web application is using
An administrator can use the Internet Service Manager to find which version of the .NET Framework runs a Web site. Different operating system versions launch the Internet Service Manager differently. To start the service manager, follow the steps listed below.

To start Internet Service Manager
  1. Go to Start.
  2. Click on run.
  3. Type inetmgr.




  4. From the Internet Service Manager, select the Web application whose version of the .NET Framework you want to know.




  5. Right-click on the Web application, and click on Properties.




  6. From the Property window, select Configuration.




  7. From the application mapping table, select .aspx, and click Edit.




  8. 8. From the Executable text box, look at the version directory by scrolling. If the version directory is v.1.1.4322, the application is mapped to .NET Framework 1.1. Conversely, if the version directory is v1.0.3705, the application is mapped to .NET Framework 1.0.


Sep 12, 2006

Create a List / combbopx in a Excel worksheet

In Excel, a single cell (or even an entire column) can be given a data validation setting so that, when selected, a dropdown list appears with a finite list the possible entries for that range.
Drop-Down list example allows a user to select a day of the week


Steps:
Select the cell or range of cells that is to contain the dropdown list box.
This may be either a single cell or a larger range
Click Data, then Validation.
Click the Settings tab (if necessary)
Under Allow, click the down arrow and select List.
Using the Source box either enter the range (A-direct list) or refer to a range (B-referenced list).
A - Type your list into the Source box. Separate items with commas with no spaces in between.
B - From within the Source Box either click and drag to select a range or type = and enter the range coordinates.

Notes
If a user tries to manually enter anything other than these values, a stop message appears and will not allow the cell to keep the invalid entry. The only options for the user will be to Retry or Cancel.
It will be possible to make valid entries (i.e., MON, TUE, WED, etc.) manually in a cell to which this validation setting has been applied; a user is not required to actually select these values from the list.
Drop-down lists (or manual entry) is not case sensitive; Wed, WED, wed, etc are all treated the same.

Mar 10, 2006

VS.Net And VSS Integration Problem

VS.Net And VSS Integration Problem

Resolution Process:
  • Go to any other machine where the integration is working.
  • Go to the C:\ProgramFiles\VisualStudio Folder
  • Copy the VSS Folder
  • Go to the problem machine
  • Go to the C:\ProgramFiles\VisualStudio Folder
  • Paste the VSS Folder
  • Enter the VSS\Win32 Folder
  • A dll File :"SSSCC.DLL" exists.
  • Register this File using the regsvr32 command.
  • VSS should now work fine...
  • Jan 5, 2006

    Visual Studio .Net- Tips and tricks - Short cut keys

    F12 - Go To Definition
    F12 itself invokes the "Go To Definition" (GTD) command. This works on types, members, locals, range variables, etc. It uses all the compiler's internal understanding of the code to make sure it takes you to the right member - even when there are many overloads or if your code is using a lot of type inference.
    Metadata As Source
    One of the additions to "Go To Definition" support in Visual Studio 2005 was something we call "Metadata as Source". If you go to definition on a type which is defined in a referenced assembly - you will be presented with a "header file"-style view of the corresponding type and it's members. This keeps you in the editor - and gives a convenient view of the type. You can continue to navigate other members/types directly from the Metadata As Source view by using GTD again on those tokens. Backward and Forward navigation
    If you use GTD a lot, you'll probably find yourself wanting to go "back" to where you invoked "go to definition" from. It turns out there is a keybinding for this:
    ctrl-shift-8: Takes you back in the GTD stack, to the the last place you invoked GTD
    ctrl-shift-7: Takes you forward in the GTD stack, to the last place you invoked back
    Code Definition Window
    The Code Definition Window is toolwindow which shows a live GTD of whatever symbol is currently under the cursor in the editor. If you find yourself using GTD a lot, you may want to pop up the Code Definition Window with ctrl-w-d.

    BTW - If you are looking for more useful keyboard shortcuts using the C# Profile in Visual Studio - take a look at the C# keybinding posters Karen blogged about a little while ago.


    Multiple copy/pastes
    Ctrl+Shift+V cycles through the clipboard ring. You can copy/cut multiple times from one area of code, then go to another area and paste them one after another.

    Drag and drop code snippets
    The Toolbox (Ctrl+Alt+X) window has multiple tabs. You can drag and drop code onto this window and copy it elsewhere. Some tabs do not allow dropping code into them; those that allow will have the appropriate icon. The General tab works for me.

    Previous cursor positions
    Ctrl+- i.e. Ctrl + Hyphen. This cycles you through the code positions you visited.

    Ctrl+Shift+- to navigate in the opposite direction.

    Incremental search
    To incrementally search for text as you type, first press Ctrl+i. Then type the word you want to search. Hit backspace to clear a character and enter to finish. Pressing F3 after this will work as usual, i.e. search for the next occurrence of previous search.

    Ctrl+i - Ctrl+i works like F3.

    Matching brace/comment/region/quote
    Ctrl+] takes you to the matching brace. It also takes you to the matching comment, region or quote depending on what is at the cursor now.

    Vertical block selection
    Press Alt and then select the area you want with your mouse.

    Closing/Showing support windows
    There are a bunch of necessary/useful windows in the Visual Studio IDE like Properties (F4), Solution Explorer (Ctrl+Alt+L), Output Window (Ctrl+Alt+O), Task List (Ctrl+Alt+K) etc. However, they take up a lot of space. An easy way around this is to use the auto hide feature.

    Open the window you want. Right click on its title and choose Auto Hide. The window will dock in whenever your mouse is not hovering over it.

    Tab groups - group code editor windows
    If you have many source code windows open, you can group them logically using tab groups. Right click the tab of the code window and choose New Horizontal Tab Group. This will move the window into a split window, allowing you to see both files. You can add more files to this new tab group and also move files back to the previous group by choosing Move To Previous Tab Group.

    Track things you have to do with Task List
    The Task List window (Ctrl+Alt+K) allows you to keep track of the things you have to do. Right click on the Task List window and choose Show TasksAll to see a list of tasks. Ctrl+Shift+F12 to cycle through your list of tasks.

    By default, comments marked with a TODO will appear in the task list.

    Edit Task List Comment Tokens
    You can add your own set of comment tokens (like the TODO comment token). Goto ToolsOptionsEnvironmentTask ListComment Tokens and make your changes. You can change the priority appearance of each comment token too.

    Add Task List Shortcut
    Add a shortcut to the task list with Ctrl+K, Ctrl+H. This will add the current line to the task list.

    Auto-complete
    Press Ctrl+Space or Alt+RightArrow to auto-complete the word. Intellisense suggestions may pop up a window if there is more than one possibility.

    Intellisense suggestions window
    Press Ctrl+Shift+Space to bring up the intellisense suggestions window. When giving parameters for functions, I often need to escape the suggestions window to check another part of code. To bring it back, I used to delete a comma and then type it again; but this is easier.

    Word wrap
    Ctrl+R Ctrl+R

    or

    ToolsOptionsText EditorAll LanguagesGeneralWord Wrap

    If you want to set this option for only one language, then choose the appropriate language instead of All Languages.

    Line numbering
    ToolsOptionsText EditorAll LanguagesGeneralLine numbers.

    If you want to set this option for only one language, then choose the appropriate language instead of All Languages.

    Favorites window
    Your IDE also functions as a browser. To see your list of favorites, press Ctrl+Alt+F or choose ViewOther WindowsFavorites.

    Bookmarks
    Bookmarks are available through EditBookmarks. Bookmarks allow you to mark places in your code that you would want to come back to.

    Create/Remove Bookmark - Ctrl+K, Ctrl+K
    Move to next bookmark - Ctrl+K, Ctrl+N
    Move to previous bookmark - Ctrl+K, Ctrl+P
    Clear all bookmarks - Ctrl+K, Ctrl+L

    Code Formatting
    Auto-format selection - Ctrl+K, Ctrl+F
    Convert to lower case - Ctrl+U
    Convert to upper case - Ctrl+Shift+U
    Comment selection - Ctrl+K, Ctrl+C
    Uncomment selection - Ctrl+K, Ctrl+U

    Outlining
    I like this feature that allows me to hide code that is irrelevant to what I'm currently working on.

    Fold/Unfold the current code block - Ctrl+M, Ctrl+M
    Unfold all - Ctrl+M, Ctrl+L
    Stop outlining - Ctrl+M, Ctrl+P
    Fold all - Ctrl+M, Ctrl+O

    Build and Debug
    Build - Ctrl+Shift+B
    Run - Ctrl+F5
    Debug - F5
    Cycle through build errors - F8






    MSDN Shortcut List