<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Footprints in the snow of a warped mind - Software|Visual Studio</title>
    <link>http://blogs.thesitedoctor.co.uk/test/</link>
    <description>newtelligence powered</description>
    <language>en-us</language>
    <copyright>Tim</copyright>
    <lastBuildDate>Sun, 18 Apr 2010 11:47:20 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>timgaunt@gmail.com</managingEditor>
    <webMaster>timgaunt@gmail.com</webMaster>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=fa16c54e-8da8-44bd-8ac3-1efeb84cd15f</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,fa16c54e-8da8-44bd-8ac3-1efeb84cd15f.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,fa16c54e-8da8-44bd-8ac3-1efeb84cd15f.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=fa16c54e-8da8-44bd-8ac3-1efeb84cd15f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
You may have come across this error once or twice while deploying your project if
you develop using Web Deployment Projects. It's usually caused when you copy and paste
a page and forget to update both the page declaration and code behind file.
</p>
        <h2>But the website builds!?!
</h2>
        <p>
You don't usually get the ILMerge error until you build the web deployment project
because when you build a website directly, it doesn't compile all the code into a
single assembly so the class names are seen as different. Part of the web deployment
process is to compile all the websites code into a single assembly hence the duplicate
references.
</p>
        <h2>What's the solution?
</h2>
        <p>
It's surprisingly simple, all you need to do is open up the offending aspx and aspx.cs
files and update two lines:
</p>
        <p>
1. In the code behind file, rename the partial class. By default Visual Studio will
name the class FolderName_Pagename which should result in a unique name
</p>
        <p>
2. The page declaration (first line of the page) in the aspx file. You have to make
sure that both the Inherits attribute and CodeBehind reference are correct.
</p>
        <p>
Tip: To avoid confusing yourself, open the files independently using the solution
browser because if you open the aspx and press F7 to switch to the code behind file
before updating the page declaration, you'll end up editing the page you copied rather
than the copy. 
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=fa16c54e-8da8-44bd-8ac3-1efeb84cd15f" />
      </body>
      <title>Error 11: An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'xyz' found in assembly 'App_Web_rh2sxhkc'. aspnet_merge</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,fa16c54e-8da8-44bd-8ac3-1efeb84cd15f.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/04/18/Error11AnErrorOccurredWhenMergingAssembliesILMergeMergeERRORDuplicateTypeXyzFoundInAssemblyAppWebrh2sxhkcAspnetmerge.aspx</link>
      <pubDate>Sun, 18 Apr 2010 11:47:20 GMT</pubDate>
      <description>&lt;p&gt;
You may have come across this error once or twice while deploying your project if
you develop using Web Deployment Projects. It's usually caused when you copy and paste
a page and forget to update both the page declaration and code behind file.
&lt;/p&gt;
&lt;h2&gt;But the website builds!?!
&lt;/h2&gt;
&lt;p&gt;
You don't usually get the ILMerge error until you build the web deployment project
because when you build a website directly, it doesn't compile all the code into a
single assembly so the class names are seen as different. Part of the web deployment
process is to compile all the websites code into a single assembly hence the duplicate
references.
&lt;/p&gt;
&lt;h2&gt;What's the solution?
&lt;/h2&gt;
&lt;p&gt;
It's surprisingly simple, all you need to do is open up the offending aspx and aspx.cs
files and update two lines:
&lt;/p&gt;
&lt;p&gt;
1. In the code behind file, rename the partial class. By default Visual Studio will
name the class FolderName_Pagename which should result in a unique name
&lt;/p&gt;
&lt;p&gt;
2. The page declaration (first line of the page) in the aspx file. You have to make
sure that both the Inherits attribute and CodeBehind reference are correct.
&lt;/p&gt;
&lt;p&gt;
Tip: To avoid confusing yourself, open the files independently using the solution
browser because if you open the aspx and press F7 to switch to the code behind file
before updating the page declaration, you'll end up editing the page you copied rather
than the copy. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=fa16c54e-8da8-44bd-8ac3-1efeb84cd15f" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,fa16c54e-8da8-44bd-8ac3-1efeb84cd15f.aspx</comments>
      <category>ASP.Net</category>
      <category>C#</category>
      <category>Software/Visual Studio</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=07139039-07ca-4b5a-8cc7-c9a9f62f9a32</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,07139039-07ca-4b5a-8cc7-c9a9f62f9a32.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,07139039-07ca-4b5a-8cc7-c9a9f62f9a32.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=07139039-07ca-4b5a-8cc7-c9a9f62f9a32</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ever wanted to be able to collapse all items within Visual Studio's solution window?
This is a nifty little Visual Studio macro that I came across a few years ago and
have been using successfully in Visual Studio 2005, Visual Studio 2008 and now in
the Visual Studio 2010 RC.
</p>
        <p>
I'll overview how to install it below in case you're unsure how to do it but I have
this bound to the key combination Ctrl+Shift+` as ReSharper now uses my previous key
combination of Ctrl+` for it's new bookmark explorer.
</p>
        <p>
Anyway, here's the Visual Studio Solution Explorer item Collapse All macro:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:509f3fe6-631a-4dea-9434-fbeaed4328bf" class="wlWriterEditableSmartContent">
          <pre class="brush: vb">Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
'-----------------------------------------------------------
' CollapseAll Module
'-----------------------------------------------------------
' Simple macro that fully collapses all items in the 
' Solution Explorer rather than just the top level node
'
' To make live easier, bind it to a keyboard setting such
' as Ctrl+Shift+` which by default has no bindings (Ctrl+` is
' now used by Resharper
'
' Tested and works with:
' Visual Studio 2005
' Visual Studio 2008
' Visual Studio 2010
'
' Originally from: http://bit.ly/bmRu3W
'-----------------------------------------------------------
Public Module CollapseAll

    Sub CollapseTree()
        ' Get the the Solution Explorer tree
        Dim solutionExplorer As UIHierarchy
        solutionExplorer = DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object()

        ' Check if there is any open solution
        If (solutionExplorer.UIHierarchyItems.Count = 0) Then
            Return
        End If

        ' Get the top node (the name of the solution)
        Dim rootNode As UIHierarchyItem = solutionExplorer.UIHierarchyItems.Item(1)
        rootNode.DTE.SuppressUI = True

        ' Collapse each project node
        Collapse(rootNode, solutionExplorer)

        ' Select the solution node, or else when you click 
        ' on the solution window
        ' scrollbar, it will synchronize the open document 
        ' with the tree and pop
        ' out the corresponding node which is probably not what you want.
        rootNode.Select(vsUISelectionType.vsUISelectionTypeSelect)
        rootNode.DTE.SuppressUI = False
    End Sub

    Private Sub Collapse(ByVal item As UIHierarchyItem, ByRef solutionExplorer As UIHierarchy)
        For Each innerItem As UIHierarchyItem In item.UIHierarchyItems
            If innerItem.UIHierarchyItems.Count &gt; 0 Then
                ' Re-cursive call
                Collapse(innerItem, solutionExplorer)
                ' Collapse
                If innerItem.UIHierarchyItems.Expanded Then
                    innerItem.UIHierarchyItems.Expanded = False
                    If innerItem.UIHierarchyItems.Expanded = True Then
                        ' Bug in VS 2005
                        innerItem.Select(vsUISelectionType.vsUISelectionTypeSelect)
                        solutionExplorer.DoDefaultAction()
                    End If
                End If

            End If
        Next
    End Sub
End Module</pre>
        </div>
        <p>
 
</p>
        <p>
In case you've never installed a Visual Studio macro before, here's a couple of instructions:
</p>
        <ol>
          <li>
In Visual Studio, press Alt+F11 to load up the Visual Studio Macro editor (or View
&gt; Other Windows &gt; Macro Explorer &gt; Double Click on "Module1" in "My Macros")</li>
          <li>
Either create a new module of it it's not in use, you can edit Module1 and past in
the code above</li>
          <li>
Save and close the Visual Studio Macro editor</li>
          <li>
You should be back in Visual Studio so click "Tools &gt; Options &gt; Environment
&gt; Keyboard"</li>
          <li>
In the "Show commands containing" text box, enter "CollapseTree" and the macro you
just created should be shown.</li>
          <li>
Make sure "Global" is selected in the "Use new shortcut in:" drop down list</li>
          <li>
Press Ctrl+Shift+` in the "Press shortcut keys:" text box</li>
          <li>
Click Assign</li>
          <li>
Click OK</li>
        </ol>
        <p>
You're done :)
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=07139039-07ca-4b5a-8cc7-c9a9f62f9a32" />
      </body>
      <title>Collapse all Solution Explorer items in Visual Studio 2010</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,07139039-07ca-4b5a-8cc7-c9a9f62f9a32.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/02/27/CollapseAllSolutionExplorerItemsInVisualStudio2010.aspx</link>
      <pubDate>Sat, 27 Feb 2010 12:22:48 GMT</pubDate>
      <description>&lt;p&gt;
Ever wanted to be able to collapse all items within Visual Studio's solution window?
This is a nifty little Visual Studio macro that I came across a few years ago and
have been using successfully in Visual Studio 2005, Visual Studio 2008 and now in
the Visual Studio 2010 RC.
&lt;/p&gt;
&lt;p&gt;
I'll overview how to install it below in case you're unsure how to do it but I have
this bound to the key combination Ctrl+Shift+` as ReSharper now uses my previous key
combination of Ctrl+` for it's new bookmark explorer.
&lt;/p&gt;
&lt;p&gt;
Anyway, here's the Visual Studio Solution Explorer item Collapse All macro:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:509f3fe6-631a-4dea-9434-fbeaed4328bf" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: vb"&gt;Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
'-----------------------------------------------------------
' CollapseAll Module
'-----------------------------------------------------------
' Simple macro that fully collapses all items in the 
' Solution Explorer rather than just the top level node
'
' To make live easier, bind it to a keyboard setting such
' as Ctrl+Shift+` which by default has no bindings (Ctrl+` is
' now used by Resharper
'
' Tested and works with:
' Visual Studio 2005
' Visual Studio 2008
' Visual Studio 2010
'
' Originally from: http://bit.ly/bmRu3W
'-----------------------------------------------------------
Public Module CollapseAll

    Sub CollapseTree()
        ' Get the the Solution Explorer tree
        Dim solutionExplorer As UIHierarchy
        solutionExplorer = DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object()

        ' Check if there is any open solution
        If (solutionExplorer.UIHierarchyItems.Count = 0) Then
            Return
        End If

        ' Get the top node (the name of the solution)
        Dim rootNode As UIHierarchyItem = solutionExplorer.UIHierarchyItems.Item(1)
        rootNode.DTE.SuppressUI = True

        ' Collapse each project node
        Collapse(rootNode, solutionExplorer)

        ' Select the solution node, or else when you click 
        ' on the solution window
        ' scrollbar, it will synchronize the open document 
        ' with the tree and pop
        ' out the corresponding node which is probably not what you want.
        rootNode.Select(vsUISelectionType.vsUISelectionTypeSelect)
        rootNode.DTE.SuppressUI = False
    End Sub

    Private Sub Collapse(ByVal item As UIHierarchyItem, ByRef solutionExplorer As UIHierarchy)
        For Each innerItem As UIHierarchyItem In item.UIHierarchyItems
            If innerItem.UIHierarchyItems.Count &amp;gt; 0 Then
                ' Re-cursive call
                Collapse(innerItem, solutionExplorer)
                ' Collapse
                If innerItem.UIHierarchyItems.Expanded Then
                    innerItem.UIHierarchyItems.Expanded = False
                    If innerItem.UIHierarchyItems.Expanded = True Then
                        ' Bug in VS 2005
                        innerItem.Select(vsUISelectionType.vsUISelectionTypeSelect)
                        solutionExplorer.DoDefaultAction()
                    End If
                End If

            End If
        Next
    End Sub
End Module&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
In case you've never installed a Visual Studio macro before, here's a couple of instructions:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
In Visual Studio, press Alt+F11 to load up the Visual Studio Macro editor (or View
&amp;gt; Other Windows &amp;gt; Macro Explorer &amp;gt; Double Click on "Module1" in "My Macros")&lt;/li&gt;
&lt;li&gt;
Either create a new module of it it's not in use, you can edit Module1 and past in
the code above&lt;/li&gt;
&lt;li&gt;
Save and close the Visual Studio Macro editor&lt;/li&gt;
&lt;li&gt;
You should be back in Visual Studio so click "Tools &amp;gt; Options &amp;gt; Environment
&amp;gt; Keyboard"&lt;/li&gt;
&lt;li&gt;
In the "Show commands containing" text box, enter "CollapseTree" and the macro you
just created should be shown.&lt;/li&gt;
&lt;li&gt;
Make sure "Global" is selected in the "Use new shortcut in:" drop down list&lt;/li&gt;
&lt;li&gt;
Press Ctrl+Shift+` in the "Press shortcut keys:" text box&lt;/li&gt;
&lt;li&gt;
Click Assign&lt;/li&gt;
&lt;li&gt;
Click OK&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
You're done :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=07139039-07ca-4b5a-8cc7-c9a9f62f9a32" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,07139039-07ca-4b5a-8cc7-c9a9f62f9a32.aspx</comments>
      <category>Development</category>
      <category>Productivity</category>
      <category>Software/Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=85926b92-9252-42bc-a240-3facb471656d</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,85926b92-9252-42bc-a240-3facb471656d.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,85926b92-9252-42bc-a240-3facb471656d.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=85926b92-9252-42bc-a240-3facb471656d</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've started using <a href="http://www.west-wind.com/presentations/configurationclass/configurationclass.asp">Rick
Strahl's wwAppConfiguration</a> to allow easier access to application constants and
one thing that's been bugging me is that it doesn't play nice with configSource -which
we update with web deployment projects to specify Development/Staging/Live settings.
</p>
        <p>
The issue is that when you set configSource on the appSettigns node, wwAppConfiguration
doesn't correctly set the file's path and instead (when using the default settings)
writes the new values within the &lt;appSettings&gt; node. The problem is then that
ASP.Net complains that you cannot specify configSource and settings inside the &lt;appSettings&gt;
node.
</p>
        <p>
After a little digging, it turns out that you can use "file" in place of "configSource"
for the appSettings node (and sadly only the appSettings node) and it allows you to
define values within the &lt;appsettings&gt; node and then override them with your
external file. This is fantastic because you can store your "default" values in the
web.config and then override some or all of them for your various environments.
</p>
        <p>
The next issue you may run into is if you use web deployment projects, in which case
you may get the following error: 
</p>
        <p>
web.config(2): error WDP00001: section appSettings in "web.config" has 7
elements but "config\STAGING-appSettings.config" has 19 elements. 
</p>
        <p>
To work around this, you just need to untick the "Enforce matching section replacements"
checkbox within the properties section and you're good to go!
</p>
        <p>
          <img src="http://blogs.sitedoc.co.uk/tim/img/20090627-WebDeploymentProject.png" width="656" height="403" />
        </p>
        <p>
I hope that helps someone!
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=85926b92-9252-42bc-a240-3facb471656d" />
      </body>
      <title>Store common AppSettings in the web.config and an external file (configSource vs. file)</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,85926b92-9252-42bc-a240-3facb471656d.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2009/06/27/StoreCommonAppSettingsInTheWebconfigAndAnExternalFileConfigSourceVsFile.aspx</link>
      <pubDate>Sat, 27 Jun 2009 07:19:19 GMT</pubDate>
      <description>&lt;p&gt;
I've started using &lt;a href="http://www.west-wind.com/presentations/configurationclass/configurationclass.asp"&gt;Rick
Strahl's wwAppConfiguration&lt;/a&gt; to allow easier access to application constants and
one thing that's been bugging me is that it doesn't play nice with configSource -which
we update with web deployment projects to specify Development/Staging/Live settings.
&lt;/p&gt;
&lt;p&gt;
The issue is that when you set configSource on the appSettigns node, wwAppConfiguration
doesn't correctly set the file's path and instead (when using the default settings)
writes the new values within the &amp;lt;appSettings&amp;gt; node. The problem is then that
ASP.Net complains that you cannot specify configSource and settings inside the &amp;lt;appSettings&amp;gt;
node.
&lt;/p&gt;
&lt;p&gt;
After a little digging, it turns out that you can use "file" in place of "configSource"
for the appSettings node (and sadly only the appSettings node) and it allows you to
define values within the &amp;lt;appsettings&amp;gt; node and then override them with your
external file. This is fantastic because you can store your "default" values in the
web.config and then override some or all of them for your various environments.
&lt;/p&gt;
&lt;p&gt;
The next issue you may run into is if you use web deployment projects, in which case
you may get the following error: 
&lt;/p&gt;
&lt;p&gt;
web.config(2): error WDP00001: section appSettings in &amp;quot;web.config&amp;quot; has 7
elements but &amp;quot;config\STAGING-appSettings.config&amp;quot; has 19 elements. 
&lt;/p&gt;
&lt;p&gt;
To work around this, you just need to untick the &amp;quot;Enforce matching section replacements&amp;quot;
checkbox within the properties section and you're good to go!
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blogs.sitedoc.co.uk/tim/img/20090627-WebDeploymentProject.png" width="656" height="403" /&gt;
&lt;/p&gt;
&lt;p&gt;
I hope that helps someone!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=85926b92-9252-42bc-a240-3facb471656d" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,85926b92-9252-42bc-a240-3facb471656d.aspx</comments>
      <category>ASP.Net</category>
      <category>Software/Visual Studio</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A little irritation/time consuming process when you're working with multiple projects
on multiple drives/SVN repos/directories is to open the current file's location within
Windows Explorer. If you weren't already aware, you can do this from most projects/files
by right clicking on the project in the solution browser:
</p>
        <img height="95" src="http://blogs.thesitedoctor.co.uk/tim/img/OpenWindowsExplorerContext.png" width="236" />
        <p>
Problem for me (and my mate Chris) is that not only is it just for the Project Item
but more importantly it means using the mouse -which is something I'm trying to avoid
as much as possible. Then I stumbled across a couple of posts which suggested <a href="http://www.neilpullinger.co.uk/2008/03/open-visual-studio-project-folder-in.html">opening
Windows Explorer</a><a href="http://www.beyondweblogs.com/post/Open-Windows-Explorer-(with-current-project-files)-in-Visual-Studio-Tools-menu.aspx">with
Visual Studio's</a> External Tools dialog.
</p>
        <p>
They're both great ideas but you still need to use the mouse so I thought I'd take
the final step and wire up some keyboard shortcuts. I'll recap the process here as
I've added/grouped a few of their settings.
</p>
        <h2>Creating the "External Tools"
</h2>
        <p>
There's a little productivity tip here for setting the folder in question the root
of Windows Explorer, this encourages you to focus on just the work in question (though
it can be a little irritating sometimes so I may "undo" this change later.
</p>
        <h3>Custom #1: Open the current solution item in Windows Explorer
</h3>
        <p>
          <strong>Title:</strong> Windows Explorer - Item 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> /select,"$(ItemPath)"
</p>
        <h3>Custom #2: Open the current Visual Studio project in Windows Explorer
</h3>
        <p>
          <strong>Title:</strong> Windows Explorer - Project Directory 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> /root,"$(ProjectDir)"
</p>
        <h3>Custom #3: Open the current Visual Studio solution in Windows Explorer
</h3>
        <p>
We've got a number of projects that have useful files/folders stored in the same folder
as the solution file so this one's useful to get quick access to them, I think I'll
use this one a lot when dealing with SVN.
</p>
        <p>
          <strong>Title:</strong> Windows Explorer - Solution Directory 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> /root,"$(SolutionDir)"
</p>
        <h3>Custom #4: Open the current solution's binary (bin) directory in Windows Explorer
</h3>
        <p>
Useful when you want to get access to the dll i.e. to copy to another folder/upload
just the dll to a website.
</p>
        <p>
          <strong>Title:</strong> Windows Explorer - Binary Directory 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> "$(TargetDir)"
</p>
        <h3>Custom #5: Open the current solution's target build directory in Windows Explorer
</h3>
        <p>
This is useful when you have a project that builds to another directory (i.e. a common
DLL directory, I'm not sure how many people do this but I've got a couple of projects
that do this so I thought I'd share it).
</p>
        <p>
          <strong>Title:</strong> Windows Explorer - Target Directory 
<br /><strong>Command:</strong> explorer.exe 
<br /><strong>Arguments:</strong> "$(BinDir)"
</p>
        <p>
In all instances you can leave the <strong>Initial Directory</strong> field empty.
</p>
        <p>
          <strong>Note:</strong> On a couple of the directory related commands I've set the
"/root" argument, this is a useful little productivity tip I learn a while ago to
stop you navigating away from your work. Irritatingly I've not found a way of using
the /select and /root commands together. It would also be nice to say "Open the bin
folder and set the root to the project folder" but again I've not found a way.
</p>
        <p>
If you're interested in the arguments I'm using there, check out the <a href="http://support.microsoft.com/kb/307856">Microsoft
Support article about How To Customize the Windows Explorer Views in Windows XP</a> (these
also work in Vista). Alternatively you can read more about the <a href="http://msdn.microsoft.com/en-us/library/c02as0cs.aspx">Visual
Studio macros for build commands here</a> (some of which are global I believe). I'm
interested to see the use of $(TargetDir) as although it'll be useful for non-web
projects, however using <a href="http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx">Web
Deployment Projects</a> might make it irrelevant for you.
</p>
        <p>
You should now have 5 new items in your Tools' toolbar:
</p>
        <p>
          <img height="187" src="http://blogs.thesitedoctor.co.uk/tim/img/NewToolsMenu_001.png" width="290" />
        </p>
        <h2>Wire up the keyboard shortcuts
</h2>
        <p>
As mentioned earlier, I want keyboard shortcuts but if you want toolbar icons, you
should checkout the <a href="http://www.neilpullinger.co.uk/2008/03/open-visual-studio-project-folder-in.html">end
of this post</a>.
</p>
        <p>
Open up the Keyboard settings within the Visual Studio Option dialog (Tools -&gt;
Options -&gt; Environment -&gt; Keyboard) -you may need to select the "Show all settings"
checkbox in the bottom left of the Options dialog to see the Keyboard option.
</p>
        <p>
In the <strong>Show commands containing</strong> field enter "Tools.ExternalCommand"
to list the set of commands, irritatingly it just labels each command as "Tools.ExternalCommand#"
for each command so this bit will require a little thinking on your behalf. My commands
are #2-6 (#1 is the Dotfuscator Community Edition command).
</p>
        <p>
I would then wire up the following shortcuts (I've set them up Globally for convenience):
</p>
        <p>
          <strong>
            <em>Tools.ExternalCommand2</em> (Current Item):</strong> Ctrl+E, I 
<br /><strong><em>Tools.ExternalCommand3</em> (Current Project):</strong> Ctrl+E, P 
<br /><strong><em>Tools.ExternalCommand4</em> (Current Solution):</strong> Ctrl+E, S 
<br /><strong><em>Tools.ExternalCommand5</em> (Bin dir):</strong> Ctrl+E, B 
<br /><strong><em>Tools.ExternalCommand6</em> (Target dir):</strong> Ctrl+E, T
</p>
        <p>
          <img height="428" src="http://blogs.thesitedoctor.co.uk/tim/img/KeyboardShortcuts.png" width="747" />
        </p>
        <p>
To enter these shortcuts simply press the first combination (in this case Ctrl+E),
then press the second key (I -item, P -project, S -solution, B -binary, T -target).
I found that a couple of these were already wired up to ReSharper and Pex which is
a pain but I don't tend to use those particular shortcuts so I just overrode them
</p>
        <p>
Now you should be able to press Ctrl+E followed by I and get your current item in
Explorer.
</p>
        <p>
It'd be nice if I could get it to use a single instance of Explorer and just refocus
the items (on another key combo as that's not always the desired action).
</p>
        <strong>Update:</strong> After using it a little, I've noticed that in my projects,
I had the Bin/TargetDir the wrong way around (now corrected).<img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2" /></body>
      <title>Visual Studio Tip of the day: Open files/folders in Windows Explorer</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2009/03/02/VisualStudioTipOfTheDayOpenFilesfoldersInWindowsExplorer.aspx</link>
      <pubDate>Mon, 02 Mar 2009 11:09:25 GMT</pubDate>
      <description>&lt;p&gt;
A little irritation/time consuming process when you're working with multiple projects
on multiple drives/SVN repos/directories is to open the current file's location within
Windows Explorer. If you weren't already aware, you can do this from most projects/files
by right clicking on the project in the solution browser:
&lt;/p&gt;
&lt;img height="95" src="http://blogs.thesitedoctor.co.uk/tim/img/OpenWindowsExplorerContext.png" width="236" /&gt; 
&lt;p&gt;
Problem for me (and my mate Chris) is that not only is it just for the Project Item
but more importantly it means using the mouse -which is something I'm trying to avoid
as much as possible. Then I stumbled across a couple of posts which suggested &lt;a href="http://www.neilpullinger.co.uk/2008/03/open-visual-studio-project-folder-in.html"&gt;opening
Windows Explorer&lt;/a&gt; &lt;a href="http://www.beyondweblogs.com/post/Open-Windows-Explorer-(with-current-project-files)-in-Visual-Studio-Tools-menu.aspx"&gt;with
Visual Studio's&lt;/a&gt; External Tools dialog.
&lt;/p&gt;
&lt;p&gt;
They're both great ideas but you still need to use the mouse so I thought I'd take
the final step and wire up some keyboard shortcuts. I'll recap the process here as
I've added/grouped a few of their settings.
&lt;/p&gt;
&lt;h2&gt;Creating the "External Tools"
&lt;/h2&gt;
&lt;p&gt;
There's a little productivity tip here for setting the folder in question the root
of Windows Explorer, this encourages you to focus on just the work in question (though
it can be a little irritating sometimes so I may "undo" this change later.
&lt;/p&gt;
&lt;h3&gt;Custom #1: Open the current solution item in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Item 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; /select,&amp;quot;$(ItemPath)&amp;quot;
&lt;/p&gt;
&lt;h3&gt;Custom #2: Open the current Visual Studio project in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Project Directory 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; /root,&amp;quot;$(ProjectDir)&amp;quot;
&lt;/p&gt;
&lt;h3&gt;Custom #3: Open the current Visual Studio solution in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
We've got a number of projects that have useful files/folders stored in the same folder
as the solution file so this one's useful to get quick access to them, I think I'll
use this one a lot when dealing with SVN.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Solution Directory 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; /root,&amp;quot;$(SolutionDir)&amp;quot;
&lt;/p&gt;
&lt;h3&gt;Custom #4: Open the current solution's binary (bin) directory in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
Useful when you want to get access to the dll i.e. to copy to another folder/upload
just the dll to a website.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Binary Directory 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; &amp;quot;$(TargetDir)&amp;quot;
&lt;/p&gt;
&lt;h3&gt;Custom #5: Open the current solution's target build directory in Windows Explorer
&lt;/h3&gt;
&lt;p&gt;
This is useful when you have a project that builds to another directory (i.e. a common
DLL directory, I'm not sure how many people do this but I've got a couple of projects
that do this so I thought I'd share it).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Title:&lt;/strong&gt; Windows Explorer - Target Directory 
&lt;br /&gt;
&lt;strong&gt;Command:&lt;/strong&gt; explorer.exe 
&lt;br /&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; &amp;quot;$(BinDir)&amp;quot;
&lt;/p&gt;
&lt;p&gt;
In all instances you can leave the &lt;strong&gt;Initial Directory&lt;/strong&gt; field empty.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Note:&lt;/strong&gt; On a couple of the directory related commands I've set the
"/root" argument, this is a useful little productivity tip I learn a while ago to
stop you navigating away from your work. Irritatingly I've not found a way of using
the /select and /root commands together. It would also be nice to say "Open the bin
folder and set the root to the project folder" but again I've not found a way.
&lt;/p&gt;
&lt;p&gt;
If you're interested in the arguments I'm using there, check out the &lt;a href="http://support.microsoft.com/kb/307856"&gt;Microsoft
Support article about How To Customize the Windows Explorer Views in Windows XP&lt;/a&gt; (these
also work in Vista). Alternatively you can read more about the &lt;a href="http://msdn.microsoft.com/en-us/library/c02as0cs.aspx"&gt;Visual
Studio macros for build commands here&lt;/a&gt; (some of which are global I believe). I'm
interested to see the use of $(TargetDir) as although it'll be useful for non-web
projects, however using &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx"&gt;Web
Deployment Projects&lt;/a&gt; might make it irrelevant for you.
&lt;/p&gt;
&lt;p&gt;
You should now have 5 new items in your Tools' toolbar:
&lt;/p&gt;
&lt;p&gt;
&lt;img height="187" src="http://blogs.thesitedoctor.co.uk/tim/img/NewToolsMenu_001.png" width="290" /&gt;
&lt;/p&gt;
&lt;h2&gt;Wire up the keyboard shortcuts
&lt;/h2&gt;
&lt;p&gt;
As mentioned earlier, I want keyboard shortcuts but if you want toolbar icons, you
should checkout the &lt;a href="http://www.neilpullinger.co.uk/2008/03/open-visual-studio-project-folder-in.html"&gt;end
of this post&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Open up the Keyboard settings within the Visual Studio Option dialog (Tools -&amp;gt;
Options -&amp;gt; Environment -&amp;gt; Keyboard) -you may need to select the "Show all settings"
checkbox in the bottom left of the Options dialog to see the Keyboard option.
&lt;/p&gt;
&lt;p&gt;
In the &lt;strong&gt;Show commands containing&lt;/strong&gt; field enter "Tools.ExternalCommand"
to list the set of commands, irritatingly it just labels each command as "Tools.ExternalCommand#"
for each command so this bit will require a little thinking on your behalf. My commands
are #2-6 (#1 is the Dotfuscator Community Edition command).
&lt;/p&gt;
&lt;p&gt;
I would then wire up the following shortcuts (I've set them up Globally for convenience):
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand2&lt;/em&gt; (Current Item):&lt;/strong&gt; Ctrl+E, I 
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand3&lt;/em&gt; (Current Project):&lt;/strong&gt; Ctrl+E, P 
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand4&lt;/em&gt; (Current Solution):&lt;/strong&gt; Ctrl+E, S 
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand5&lt;/em&gt; (Bin dir):&lt;/strong&gt; Ctrl+E, B 
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Tools.ExternalCommand6&lt;/em&gt; (Target dir):&lt;/strong&gt; Ctrl+E, T
&lt;/p&gt;
&lt;p&gt;
&lt;img height="428" src="http://blogs.thesitedoctor.co.uk/tim/img/KeyboardShortcuts.png" width="747" /&gt;
&lt;/p&gt;
&lt;p&gt;
To enter these shortcuts simply press the first combination (in this case Ctrl+E),
then press the second key (I -item, P -project, S -solution, B -binary, T -target).
I found that a couple of these were already wired up to ReSharper and Pex which is
a pain but I don't tend to use those particular shortcuts so I just overrode them
&lt;/p&gt;
&lt;p&gt;
Now you should be able to press Ctrl+E followed by I and get your current item in
Explorer.
&lt;/p&gt;
&lt;p&gt;
It'd be nice if I could get it to use a single instance of Explorer and just refocus
the items (on another key combo as that's not always the desired action).
&lt;/p&gt;
&lt;strong&gt;Update:&lt;/strong&gt; After using it a little, I've noticed that in my projects,
I had the Bin/TargetDir the wrong way around (now corrected).&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,f5dcc54e-dfbc-4f79-8bfa-0deeb31902d2.aspx</comments>
      <category>Productivity</category>
      <category>Software/Visual Studio</category>
      <category>The Site Doctor</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=59e396af-2f03-4bce-a4b9-5651a5b7cf6c</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,59e396af-2f03-4bce-a4b9-5651a5b7cf6c.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,59e396af-2f03-4bce-a4b9-5651a5b7cf6c.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=59e396af-2f03-4bce-a4b9-5651a5b7cf6c</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I thought I'd share some festive "fun" today. For quite some time now I've hooked
into the build events within Visual Studio but I think this is just taking it too
far...
</p>
        <p>
          <a href="http://blogs.sitedoc.co.uk/tim/img/New Build Routine.png" rel="[lightbox]">
            <img height="72" src="http://farm4.static.flickr.com/3200/3111244018_81f4661a0e_m.jpg" width="240" />
          </a>
        </p>
        <p>
Basically the script now increments the version number of the DLL (if relevant) automatically,
times the time for the build and adds it to a total build time to date (stored in
an external txt file) and finally prints out whether the build was a success or not
-basically some of our projects are taking a while to build and I wanted something
that was "clearer" ;)
</p>
        <p>
I'm thinking about adding Christmas trees next, anyone know how to do them in ASCII?
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=59e396af-2f03-4bce-a4b9-5651a5b7cf6c" />
      </body>
      <title>Custom Visual Studio Build Events</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,59e396af-2f03-4bce-a4b9-5651a5b7cf6c.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/12/15/CustomVisualStudioBuildEvents.aspx</link>
      <pubDate>Mon, 15 Dec 2008 18:21:37 GMT</pubDate>
      <description>&lt;p&gt;
I thought I'd share some festive "fun" today. For quite some time now I've hooked
into the build events within Visual Studio but I think this is just taking it too
far...
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.sitedoc.co.uk/tim/img/New Build Routine.png" rel="[lightbox]"&gt;&lt;img height="72" src="http://farm4.static.flickr.com/3200/3111244018_81f4661a0e_m.jpg" width="240" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Basically the script now increments the version number of the DLL (if relevant) automatically,
times the time for the build and adds it to a total build time to date (stored in
an external txt file) and finally prints out whether the build was a success or not
-basically some of our projects are taking a while to build and I wanted something
that was "clearer" ;)
&lt;/p&gt;
&lt;p&gt;
I'm thinking about adding Christmas trees next, anyone know how to do them in ASCII?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=59e396af-2f03-4bce-a4b9-5651a5b7cf6c" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,59e396af-2f03-4bce-a4b9-5651a5b7cf6c.aspx</comments>
      <category>C#</category>
      <category>Software/Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=cccc56c3-df32-4c82-be11-e029106f93f8</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,cccc56c3-df32-4c82-be11-e029106f93f8.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,cccc56c3-df32-4c82-be11-e029106f93f8.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=cccc56c3-df32-4c82-be11-e029106f93f8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We had an interesting problem the other day while integrating with a web service hosted
on an apache server. Every time we called the WSDL methods we could see a valid request
being sent and a valid response being returned (ok there were a few syntax errors
but nothing that would stop it converting) but despite this every time, without fail,
it would return null at code level.
</p>
        <p>
The solution was actually amazingly simple. In short, since our last flurry with web
services we've upgraded to Visual Studio 2008 and installed ReSharper (see below for
how that's relevant). In VS2008 they've sneakily added a new menu "Add Service
Reference" and although it's in the same menu location and a similar wording
etc does something different. If you add your WSDL reference this way it will more
than likely fail.
</p>
        <p>
To add a "Web Reference" in Visual Studio 2008 follow the instructions below and hopefully
you won't go down the same routes that I did trying to debug the XML...
</p>
        <p>
Click the "Add Service Reference" menu option (obviously!) 
</p>
        <p>
          <img height="93" src="http://blogs.sitedoc.co.uk/tim/img/VS2008AddServiceReference.png" width="242" />
        </p>
        <p>
The screen below should appear, instead of entering the address of the web service
into the address bar, click the advanced button at the bottom (highlighted)
</p>
        <p>
          <img height="508" src="http://blogs.sitedoc.co.uk/tim/img/AddServiceReference1.png" width="631" />
        </p>
        <p>
That'll then bring up the screen below, on which you need to click the "Add Web Reference"
button at the bottom.
</p>
        <p>
          <img height="601" src="http://blogs.sitedoc.co.uk/tim/img/AddServiceReference2.png" width="649" />
        </p>
        <p>
You should then be presented with the usual "Add Web Reference" screen (see below).
</p>
        <p>
          <img height="572" src="http://blogs.sitedoc.co.uk/tim/img/VS2008WebServiceReference.png" width="825" />
        </p>
        <p>
Why did I mention ReSharper? Well I've notice that as well as adding to the IDE they've
also updated some of the menu items, most noticeably "Go to Definition"
which is now "go to Declaration" (see below) so I figured this new menu
option was thanks to them.
</p>
        <p>
ReSharper: <img height="73" src="http://blogs.sitedoc.co.uk/tim/img/VS2008GoToDeclaration.png" width="195" /></p>
        <p>
Without ReSharper: <img height="71" alt="VS2008GoToDeclarationWithoutResharper.png" src="http://blogs.sitedoc.co.uk/tim/img/VS2008GoToDeclarationWithoutResharper.png" width="165" /></p>
        <p>
So the next time your WSDL is returning a null object even though a valid response
is being retrieved, check how you added it in Visual Studio,.
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=cccc56c3-df32-4c82-be11-e029106f93f8" />
      </body>
      <title>WSDL returning a valid response but object is null</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,cccc56c3-df32-4c82-be11-e029106f93f8.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/11/01/WSDLReturningAValidResponseButObjectIsNull.aspx</link>
      <pubDate>Sat, 01 Nov 2008 18:28:49 GMT</pubDate>
      <description>&lt;p&gt;
We had an interesting problem the other day while integrating with a web service hosted
on an apache server. Every time we called the WSDL methods we could see a valid request
being sent and a valid response being returned (ok there were a few syntax errors
but nothing that would stop it converting) but despite this every time, without fail,
it would return null at code level.
&lt;/p&gt;
&lt;p&gt;
The solution was actually amazingly simple. In short, since our last flurry with web
services we've upgraded to Visual Studio 2008 and installed ReSharper (see below for
how that's relevant). In VS2008 they've sneakily added a new menu &amp;quot;Add Service
Reference&amp;quot; and although it's in the same menu location and a similar wording
etc does something different. If you add your WSDL reference this way it will more
than likely fail.
&lt;/p&gt;
&lt;p&gt;
To add a "Web Reference" in Visual Studio 2008 follow the instructions below and hopefully
you won't go down the same routes that I did trying to debug the XML...
&lt;/p&gt;
&lt;p&gt;
Click the "Add Service Reference" menu option (obviously!) 
&lt;/p&gt;
&lt;p&gt;
&lt;img height="93" src="http://blogs.sitedoc.co.uk/tim/img/VS2008AddServiceReference.png" width="242" /&gt;
&lt;/p&gt;
&lt;p&gt;
The screen below should appear, instead of entering the address of the web service
into the address bar, click the advanced button at the bottom (highlighted)
&lt;/p&gt;
&lt;p&gt;
&lt;img height="508" src="http://blogs.sitedoc.co.uk/tim/img/AddServiceReference1.png" width="631" /&gt;
&lt;/p&gt;
&lt;p&gt;
That'll then bring up the screen below, on which you need to click the "Add Web Reference"
button at the bottom.
&lt;/p&gt;
&lt;p&gt;
&lt;img height="601" src="http://blogs.sitedoc.co.uk/tim/img/AddServiceReference2.png" width="649" /&gt;
&lt;/p&gt;
&lt;p&gt;
You should then be presented with the usual "Add Web Reference" screen (see below).
&lt;/p&gt;
&lt;p&gt;
&lt;img height="572" src="http://blogs.sitedoc.co.uk/tim/img/VS2008WebServiceReference.png" width="825" /&gt;
&lt;/p&gt;
&lt;p&gt;
Why did I mention ReSharper? Well I've notice that as well as adding to the IDE they've
also updated some of the menu items, most noticeably &amp;quot;Go to Definition&amp;quot;
which is now &amp;quot;go to Declaration&amp;quot; (see below) so I figured this new menu
option was thanks to them.
&lt;/p&gt;
&lt;p&gt;
ReSharper: &lt;img height="73" src="http://blogs.sitedoc.co.uk/tim/img/VS2008GoToDeclaration.png" width="195" /&gt;
&lt;/p&gt;
&lt;p&gt;
Without ReSharper: &lt;img height="71" alt="VS2008GoToDeclarationWithoutResharper.png" src="http://blogs.sitedoc.co.uk/tim/img/VS2008GoToDeclarationWithoutResharper.png" width="165" /&gt;
&lt;/p&gt;
&lt;p&gt;
So the next time your WSDL is returning a null object even though a valid response
is being retrieved, check how you added it in Visual Studio,.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=cccc56c3-df32-4c82-be11-e029106f93f8" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,cccc56c3-df32-4c82-be11-e029106f93f8.aspx</comments>
      <category>ASP.Net</category>
      <category>ASP.Net/Web Service</category>
      <category>ASP.Net/WSDL</category>
      <category>C#</category>
      <category>Software/Visual Studio</category>
      <category>The Site Doctor</category>
      <category>WebDD</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=8f810d1a-e0c5-4725-bccd-4a2334bbfe22</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,8f810d1a-e0c5-4725-bccd-4a2334bbfe22.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,8f810d1a-e0c5-4725-bccd-4a2334bbfe22.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=8f810d1a-e0c5-4725-bccd-4a2334bbfe22</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <br />
          <img src="http://blogs.thesitedoctor.co.uk/tim/img/HeroesHappenHere.png" align="right" /> For
those of you Microsoft readers I thought I'd let you know I've just had an email come
through about Visual Studio's UK Launch. It's happening on March 19th 2008 in Birmingham's
ICC. Registration has finally opened and you can register here: <a title="http://go.microsoft.com/?linkid=8126604" href="http://go.microsoft.com/?linkid=8126604">http://go.microsoft.com/?linkid=8126604</a></p>
        <p>
Alternatively check out the live cast at: <a href="http://www.heroeshappenhere.co.uk">www.heroeshappenhere.co.uk</a>.
</p>
        <p>
Why am I excited about this? Well the last launch event I went to gave away free -and
full- copies of Microsoft Visual Studio 2005 and SQL Server 2005 to every delegate!
Hope to see you there -let me know if you can make it.
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=8f810d1a-e0c5-4725-bccd-4a2334bbfe22" />
      </body>
      <title>Registration opens for the UK launch of Visual Studio 2008 -in Birmingham</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,8f810d1a-e0c5-4725-bccd-4a2334bbfe22.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/01/18/RegistrationOpensForTheUKLaunchOfVisualStudio2008InBirmingham.aspx</link>
      <pubDate>Fri, 18 Jan 2008 12:13:38 GMT</pubDate>
      <description>&lt;p&gt;
&lt;br&gt;
&lt;img src="http://blogs.thesitedoctor.co.uk/tim/img/HeroesHappenHere.png" align="right"&gt; For
those of you Microsoft readers I thought I'd let you know I've just had an email come
through about Visual Studio's UK Launch. It's happening on March 19th 2008 in Birmingham's
ICC. Registration has finally opened and you can register here: &lt;a title="http://go.microsoft.com/?linkid=8126604" href="http://go.microsoft.com/?linkid=8126604"&gt;http://go.microsoft.com/?linkid=8126604&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Alternatively check out the live cast at: &lt;a href="http://www.heroeshappenhere.co.uk"&gt;www.heroeshappenhere.co.uk&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Why am I excited about this? Well the last launch event I went to gave away free -and
full- copies of Microsoft Visual Studio 2005 and SQL Server 2005 to every delegate!
Hope to see you there -let me know if you can make it.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=8f810d1a-e0c5-4725-bccd-4a2334bbfe22" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,8f810d1a-e0c5-4725-bccd-4a2334bbfe22.aspx</comments>
      <category>Software/Visual Studio</category>
      <category>The Site Doctor</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=b9112397-f0aa-43d6-8762-bed045a97b58</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,b9112397-f0aa-43d6-8762-bed045a97b58.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,b9112397-f0aa-43d6-8762-bed045a97b58.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=b9112397-f0aa-43d6-8762-bed045a97b58</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img src="http://blogs.thesitedoctor.co.uk/tim/img/tn_Visual-Studio-2008-Birmingham-Launch-Registration.jpg" align="right" />This
mad me smile,  when surfing around at lunch I stumbled across <a href="http://www.heroeshappenhere.com">www.heroeshappenhere.com</a> -Microsoft's
Visual Studio 2008 launch site. I got all giddy with excitement, downloaded the latest
version of Silverlight and woohoo -a registration link! Finally!
</p>
        <p>
Sadly though, you can only register for the LA event at the moment. Check the "Outside
of the US" drop down though, it'll make you smile (or at least it did me) -notice
anyone missing? (Other than France that is :P)
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=b9112397-f0aa-43d6-8762-bed045a97b58" />
      </body>
      <title>Registration opens for Visual Studio 2008 launch events... but the UK doesn't exist (yet!)</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,b9112397-f0aa-43d6-8762-bed045a97b58.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/01/03/RegistrationOpensForVisualStudio2008LaunchEventsButTheUKDoesntExistYet.aspx</link>
      <pubDate>Thu, 03 Jan 2008 14:38:19 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img src="http://blogs.thesitedoctor.co.uk/tim/img/tn_Visual-Studio-2008-Birmingham-Launch-Registration.jpg" align="right"&gt;This
mad me smile,&amp;nbsp; when surfing around at lunch I stumbled across &lt;a href="http://www.heroeshappenhere.com"&gt;www.heroeshappenhere.com&lt;/a&gt; -Microsoft's
Visual Studio 2008 launch site. I got all giddy with excitement, downloaded the latest
version of Silverlight and woohoo -a registration link! Finally!
&lt;/p&gt;
&lt;p&gt;
Sadly though, you can only register for the LA event at the moment. Check the "Outside
of the US" drop down though, it'll make you smile (or at least it did me) -notice
anyone missing? (Other than France that is :P)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=b9112397-f0aa-43d6-8762-bed045a97b58" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,b9112397-f0aa-43d6-8762-bed045a97b58.aspx</comments>
      <category>Software/Visual Studio</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=81c5d702-2052-43d2-9e13-25dd1759f8bd</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,81c5d702-2052-43d2-9e13-25dd1759f8bd.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,81c5d702-2052-43d2-9e13-25dd1759f8bd.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=81c5d702-2052-43d2-9e13-25dd1759f8bd</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After a number of months of hearing how great Microsoft's latest web development environment
is -Microsoft Expression Web- I thought I would install it in place of Dreamweaver
on my new laptop. I was -until today- pretty impressed with some of it's features,
how well it handles CSS within the IDE and had no reason to complain.
</p>
        <p>
That was until today. As I write this, I'm sitting in our apartment in Croatia with
the sun beating down on me, generally enjoying life. As it's incredibly hot outside
around noon, I thought it would be a good idea to crack on with some work on the new
The Site Doctor design -which I hope to have online shortly after I return. So I load
up Microsoft Expression Web and the various pages of the new site and crack on.
</p>
        <p>
I've already sorted the CSS for the site so there was no need to open any of the files
or make alterations to them however I like to have them open so I can check class
names and ids as I work. When I switched over at one point, I noticed that my nice,
neat and tidy CSS file of around 190 lines was suddenly closer to 300. I couldn't
work it out until I noticed that Microsoft Expression Web had separated out all
my group declarations into separate declarations such i.e.:
</p>
        <div class="code">
          <div id="closed633201959535800000_1" style="display: none">
            <img onclick="showHideCodeDiv('633201959535800000_1', false)" src="/img/sc/PlusNoLines.gif" align="top" />
            <b>
              <span style="color: #8b0000">a</span>
            </b>
            <span style="color: #8b0000">,</span> <b><span style="color: #8b0000">a:link</span></b><span style="color: #8b0000">,</span> <b><span style="color: #8b0000">a:visited</span></b><span style="color: #8b0000">,</span> <b><span style="color: #8b0000">a:active</span></b><b><span style="color: #00008b">{...}</span></b></div>
          <div id="open633201959535800000_1" style="display: block">
            <img onclick="showHideCodeDiv('633201959535800000_1', true)" src="/img/sc/minusNoTopLine.gif" align="top" />
            <b>
              <span style="color: #8b0000">a</span>
            </b>
            <span style="color: #8b0000">,</span> <b><span style="color: #8b0000">a:link</span></b><span style="color: #8b0000">,</span> <b><span style="color: #8b0000">a:visited</span></b><span style="color: #8b0000">,</span> <b><span style="color: #8b0000">a:active</span></b>{<br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">text-underline</span><span style="color: #0000ff">:</span> <span style="color: #0000ff">none</span><span style="color: #0000ff">;</span><br /><img src="/img/sc/L.gif" align="top" />}
</div>
        </div>
        <p>
Became:
</p>
        <div class="code">
          <div id="closed633201961295080000_1" style="display: none">
            <img onclick="showHideCodeDiv('633201961295080000_1', false)" src="/img/sc/PlusNoLines.gif" align="top" />
            <b>
              <span style="color: #8b0000">a:active</span>
            </b>
            <b>
              <span style="color: #00008b">{...}</span>
            </b>
          </div>
          <div id="open633201961295080000_1" style="display: block">
            <img onclick="showHideCodeDiv('633201961295080000_1', true)" src="/img/sc/minusNoTopLine.gif" align="top" />
            <b>
              <span style="color: #8b0000">a:active</span>
            </b>{<br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">text-underline</span><span style="color: #0000ff">:</span> <span style="color: #0000ff">none</span><span style="color: #0000ff">;</span><br /><img src="/img/sc/L.gif" align="top" />}
</div>
          <div id="closed633201961295080000_4" style="display: none">
            <img onclick="showHideCodeDiv('633201961295080000_4', false)" src="/img/sc/PlusNoLines.gif" align="top" />
            <b>
              <span style="color: #8b0000">a:visited</span>
            </b>
            <b>
              <span style="color: #00008b">{...}</span>
            </b>
          </div>
          <div id="open633201961295080000_4" style="display: block">
            <img onclick="showHideCodeDiv('633201961295080000_4', true)" src="/img/sc/minusNoTopLine.gif" align="top" />
            <b>
              <span style="color: #8b0000">a:visited</span>
            </b>{<br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">text-underline</span><span style="color: #0000ff">:</span> <span style="color: #0000ff">none</span><span style="color: #0000ff">;</span><br /><img src="/img/sc/L.gif" align="top" />}
</div>
          <div id="closed633201961295080000_7" style="display: none">
            <img onclick="showHideCodeDiv('633201961295080000_7', false)" src="/img/sc/PlusNoLines.gif" align="top" />
            <b>
              <span style="color: #8b0000">a:link</span>
            </b>
            <b>
              <span style="color: #00008b">{...}</span>
            </b>
          </div>
          <div id="open633201961295080000_7" style="display: block">
            <img onclick="showHideCodeDiv('633201961295080000_7', true)" src="/img/sc/minusNoTopLine.gif" align="top" />
            <b>
              <span style="color: #8b0000">a:link</span>
            </b>{<br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">text-underline</span><span style="color: #0000ff">:</span> <span style="color: #0000ff">none</span><span style="color: #0000ff">;</span><br /><img src="/img/sc/L.gif" align="top" />}
</div>
          <div id="closed633201961295080000_10" style="display: none">
            <img onclick="showHideCodeDiv('633201961295080000_10', false)" src="/img/sc/PlusNoLines.gif" align="top" />
            <b>
              <span style="color: #8b0000">a</span>
            </b>
            <b>
              <span style="color: #00008b">{...}</span>
            </b>
          </div>
          <div id="open633201961295080000_10" style="display: block">
            <img onclick="showHideCodeDiv('633201961295080000_10', true)" src="/img/sc/minusNoTopLine.gif" align="top" />
            <b>
              <span style="color: #8b0000">a</span>
            </b>{<br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">text-underline</span><span style="color: #0000ff">:</span> <span style="color: #0000ff">none</span><span style="color: #0000ff">;</span><br /><img src="/img/sc/L.gif" align="top" />}
</div>
        </div>
        <p>
Well done Microsoft, I thought you would have learnt your lesson after the fiasco
that was Visual Studio 2003's HTML editing, what on earth were you thinking? I'm sure
this is a simple setting I need to change (and I can understand why they've done it)
but not having Internet access here there's no easy way of finding out (I've searched
the help files) which means hours of careful CSS architecture have been completely
trashed.
</p>
        <p>
So, as soon as I realised, I spent about 20 minutes meticulously working through the
bunch of CSS files open reversing the mess Microsoft had made of them and promptly
closed them, safe in the knowledge Microsoft Expression Web can't mess with them
again. Or so I thought.
</p>
        <p>
A short while ago I needed to open one of the CSS files again to alter a few declarations
and to my horror I found that the declarations had been ungrouped. I can't believe
it, not content with simply altering the CSS files that are open, Microsoft Expression
Web actually alters the CSS files on the FSO without you knowing. 
</p>
        <p>
If you're ever thinking about using Microsoft Expression Web for CSS development
then don't expect your files to be neat and tidy, in my case I would say the files
were increased in size by almost 5x which ok may be 1Kb --&gt; 5Kb but if you're getting
tens of thousands of hits a day, that's a serious bandwidth increase.
</p>
        <p>
Not a happy bunny.
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=81c5d702-2052-43d2-9e13-25dd1759f8bd" />
      </body>
      <title>Microsoft Expression Web and CSS -is it all it's cracked up to be?</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,81c5d702-2052-43d2-9e13-25dd1759f8bd.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2007/07/19/MicrosoftExpressionWebAndCSSIsItAllItsCrackedUpToBe.aspx</link>
      <pubDate>Thu, 19 Jul 2007 22:02:32 GMT</pubDate>
      <description>&lt;p&gt;
After a number of months of hearing how great Microsoft's latest web development environment
is -Microsoft&amp;nbsp;Expression Web- I thought I would install it in place of Dreamweaver
on my new laptop. I was -until today- pretty impressed with some of it's features,
how well it handles CSS within the IDE and had no reason to complain.
&lt;/p&gt;
&lt;p&gt;
That was until today. As I write this, I'm sitting in our apartment in Croatia with
the sun beating down on me, generally enjoying life. As it's incredibly hot outside
around noon, I thought it would be a good idea to crack on with some work on the new
The Site Doctor design -which I hope to have online shortly after I return. So I load
up Microsoft&amp;nbsp;Expression Web and the various pages of the new site and crack on.
&lt;/p&gt;
&lt;p&gt;
I've already sorted the CSS for the site so there was no need to open any of the files
or make alterations to them however I like to have them open so I can check class
names and ids as I work. When I switched over at one point, I noticed that my nice,
neat and tidy CSS file of around 190 lines was suddenly closer to 300. I couldn't
work it out until I noticed that Microsoft&amp;nbsp;Expression Web had separated out all
my group declarations into separate declarations such i.e.:
&lt;/p&gt;
&lt;div class="code"&gt;
&lt;div id="closed633201959535800000_1" style="display: none"&gt;&lt;img onclick="showHideCodeDiv('633201959535800000_1', false)" src="/img/sc/PlusNoLines.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a&lt;/span&gt;&lt;/b&gt;&lt;span style="color: #8b0000"&gt;,&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:link&lt;/span&gt;&lt;/b&gt;&lt;span style="color: #8b0000"&gt;,&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:visited&lt;/span&gt;&lt;/b&gt;&lt;span style="color: #8b0000"&gt;,&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:active&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div id="open633201959535800000_1" style="display: block"&gt;&lt;img onclick="showHideCodeDiv('633201959535800000_1', true)" src="/img/sc/minusNoTopLine.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a&lt;/span&gt;&lt;/b&gt;&lt;span style="color: #8b0000"&gt;,&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:link&lt;/span&gt;&lt;/b&gt;&lt;span style="color: #8b0000"&gt;,&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:visited&lt;/span&gt;&lt;/b&gt;&lt;span style="color: #8b0000"&gt;,&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:active&lt;/span&gt;&lt;/b&gt;{&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&lt;span style="color: #ff0000"&gt;text-underline&lt;/span&gt;&lt;span style="color: #0000ff"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000ff"&gt;none&lt;/span&gt;&lt;span style="color: #0000ff"&gt;;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/L.gif" align="top"&gt;}
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Became:
&lt;/p&gt;
&lt;div class="code"&gt;
&lt;div id="closed633201961295080000_1" style="display: none"&gt;&lt;img onclick="showHideCodeDiv('633201961295080000_1', false)" src="/img/sc/PlusNoLines.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:active&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div id="open633201961295080000_1" style="display: block"&gt;&lt;img onclick="showHideCodeDiv('633201961295080000_1', true)" src="/img/sc/minusNoTopLine.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:active&lt;/span&gt;&lt;/b&gt;{&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&lt;span style="color: #ff0000"&gt;text-underline&lt;/span&gt;&lt;span style="color: #0000ff"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000ff"&gt;none&lt;/span&gt;&lt;span style="color: #0000ff"&gt;;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/L.gif" align="top"&gt;}
&lt;/div&gt;
&lt;div id="closed633201961295080000_4" style="display: none"&gt;&lt;img onclick="showHideCodeDiv('633201961295080000_4', false)" src="/img/sc/PlusNoLines.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:visited&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div id="open633201961295080000_4" style="display: block"&gt;&lt;img onclick="showHideCodeDiv('633201961295080000_4', true)" src="/img/sc/minusNoTopLine.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:visited&lt;/span&gt;&lt;/b&gt;{&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&lt;span style="color: #ff0000"&gt;text-underline&lt;/span&gt;&lt;span style="color: #0000ff"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000ff"&gt;none&lt;/span&gt;&lt;span style="color: #0000ff"&gt;;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/L.gif" align="top"&gt;}
&lt;/div&gt;
&lt;div id="closed633201961295080000_7" style="display: none"&gt;&lt;img onclick="showHideCodeDiv('633201961295080000_7', false)" src="/img/sc/PlusNoLines.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:link&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div id="open633201961295080000_7" style="display: block"&gt;&lt;img onclick="showHideCodeDiv('633201961295080000_7', true)" src="/img/sc/minusNoTopLine.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a:link&lt;/span&gt;&lt;/b&gt;{&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&lt;span style="color: #ff0000"&gt;text-underline&lt;/span&gt;&lt;span style="color: #0000ff"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000ff"&gt;none&lt;/span&gt;&lt;span style="color: #0000ff"&gt;;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/L.gif" align="top"&gt;}
&lt;/div&gt;
&lt;div id="closed633201961295080000_10" style="display: none"&gt;&lt;img onclick="showHideCodeDiv('633201961295080000_10', false)" src="/img/sc/PlusNoLines.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div id="open633201961295080000_10" style="display: block"&gt;&lt;img onclick="showHideCodeDiv('633201961295080000_10', true)" src="/img/sc/minusNoTopLine.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #8b0000"&gt;a&lt;/span&gt;&lt;/b&gt;{&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&lt;span style="color: #ff0000"&gt;text-underline&lt;/span&gt;&lt;span style="color: #0000ff"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000ff"&gt;none&lt;/span&gt;&lt;span style="color: #0000ff"&gt;;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/L.gif" align="top"&gt;}
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Well done Microsoft, I thought you would have learnt your lesson after the fiasco
that was Visual Studio 2003's HTML editing, what on earth were you thinking? I'm sure
this is a simple setting I need to change (and I can understand why they've done it)
but not having Internet access here there's no easy way of finding out (I've searched
the help files) which means hours of careful CSS architecture have been completely
trashed.
&lt;/p&gt;
&lt;p&gt;
So, as soon as I realised, I spent about 20 minutes meticulously working through the
bunch of CSS files open reversing the mess Microsoft had made of them and promptly
closed them, safe in the knowledge Microsoft&amp;nbsp;Expression Web can't mess with them
again. Or so I thought.
&lt;/p&gt;
&lt;p&gt;
A short while ago I needed to open one of the CSS files again to alter a few declarations
and to my horror I found that the declarations had been ungrouped. I can't believe
it, not content with simply altering the CSS files that are open, Microsoft&amp;nbsp;Expression
Web actually alters the CSS files on the FSO without you knowing. 
&lt;/p&gt;
&lt;p&gt;
If you're ever thinking about using Microsoft&amp;nbsp;Expression Web for CSS development
then don't expect your files to be neat and tidy, in my case I would say the files
were increased in size by almost 5x which ok may be 1Kb --&amp;gt; 5Kb but if you're getting
tens of thousands of hits a day, that's a serious bandwidth increase.
&lt;/p&gt;
&lt;p&gt;
Not a happy bunny.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=81c5d702-2052-43d2-9e13-25dd1759f8bd" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,81c5d702-2052-43d2-9e13-25dd1759f8bd.aspx</comments>
      <category>CSS</category>
      <category>Software/Visual Studio</category>
      <category>Software/Windows</category>
      <category>The Site Doctor</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=9fe84fb1-2861-42c3-bc1e-6d059b696909</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,9fe84fb1-2861-42c3-bc1e-6d059b696909.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,9fe84fb1-2861-42c3-bc1e-6d059b696909.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=9fe84fb1-2861-42c3-bc1e-6d059b696909</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A couple of people have got stuck on various lists/forums I’m on moving from ASP to
ASP.Net and the differences there are, the one first major sticking point I had was
referencing DLLs –so don’t worry you’re not the only one! So this is a really simple
look at what you need to look at and how you reference DLLs –if you’ve ever added
a DLL before you’ll probably find that this is too simplistic for you but read on
anyway!<br />
Firstly, referencing a DLL is basically a way of including someone else’s code within
your project (or a common codebase that you re-use), this also includes controls,
useful/common functions or just additional functionality such as Crystal reports.<br />
Before you can use someone else’s code (i.e. Phil Whinstanley’s error reporting class)
within your code you have to include a reference to the relevant DLL. The first thing
I would do is create a folder somewhere that’s easily accessible to all machines that
may need to reference the DLL i.e. “c:\Useful DLLs\”. Then, within this folder, I
would create the following sub folders:
</p>
        <ul>
          <li>
c:\Useful DLLs\.Net 1.1 
</li>
          <li>
c:\Useful DLLs\.Net 2.0 
</li>
          <li>
c:\Useful DLLs\.Net 3.0 
</li>
          <li>
c:\Useful DLLs\ASP.Net 1.1 
</li>
          <li>
c:\Useful DLLs\ASP.Net 2.0 
</li>
          <li>
c:\Useful DLLs\ASP.Net 3.0 
</li>
        </ul>
        <p>
This is something that I’ve only recently started doing after having multiple releases
for the same DLL. For each DLL place a copy within the relevant folder.<br />
Next, load your project within Visual Studio, right click the solution (this is the
very top of the tree) and select “Add Reference":
</p>
        <ul class="photoList">
          <li>
            <a title="Visual Studio 2003 add a reference context menu" href="/tim/img/Visual-Studio-2003-add-a-reference-context-menu.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2003<img alt="Visual Studio 2003 add a reference context menu" src="/tim/img/tn_Visual-Studio-2003-add-a-reference-context-menu.png" /></a>
          </li>
          <li>
            <a title="Visual Studio 2005 add a reference context menu" href="/tim/img/Visual-Studio-2005-add-a-reference-context-menu.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2005<img alt="Visual Studio 2005 add a reference context menu" src="/tim/img/tn_Visual-Studio-2005-add-a-reference-context-menu.png" /></a>
          </li>
        </ul>
        <div style="clear: left">
        </div>
        <p>
A window will then popup that looks something like this:
</p>
        <ul class="photoList">
          <li>
            <a title="Visual Studio 2003 add a reference window" href="/tim/img/Visual-Studio-2003-add-a-reference.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2003<img alt="Visual Studio 2003 add a reference window" src="/tim/img/tn_Visual-Studio-2003-add-a-reference.png" /></a>
          </li>
          <li>
            <a title="Visual Studio 2005 add a reference window" href="/tim/img/Visual-Studio-2005-add-a-reference.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2005<img alt="Visual Studio 2005 add a reference window" src="/tim/img/tn_Visual-Studio-2005-add-a-reference.png" /></a>
          </li>
        </ul>
        <div style="clear: left">
        </div>
        <p>
Depending on what sort of reference this is, the majority of the time I would expect
you’ll be needing to use the “Browse” tab –this allows you to navigate the FSO and
find the DLL to reference (which should be somewhere in c:\useful dlls\). Once you’ve
found it select the DLL and click Add.
</p>
        <p>
Your DLL is now referenced and you should be able to start using it straight away.
Depending on what you need to do with it you’ll also need to add Page and/or Codebehind
imports. To check that it has imported correctly, in Visual Studio 2003 you should
be able to see it in the references folder or in Visual Studio 2005 you will need
to click into the "Class View" tab of the Solution explorer: 
</p>
        <ul class="photoList">
          <li>
            <a title="Visual Studio 2003 checking the reference is ok" href="/tim/img/Visual-Studio-2003-add-a-reference-dll-added.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2003<img alt="Visual Studio 2003 checking the reference is ok" src="/tim/img/tn_Visual-Studio-2003-add-a-reference-dll-added.png" /></a>
          </li>
          <li>
            <a title="Visual Studio 2005 checking the reference is ok" href="/tim/img/Visual-Studio-2005-add-a-reference-dll-added.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2005<img alt="Visual Studio 2005 checking the reference is ok" src="/tim/img/tn_Visual-Studio-2005-add-a-reference-dll-added.png" /></a>
          </li>
        </ul>
        <div style="clear: left">
        </div>
        <h2>How do I identify the namespace?
</h2>
        <p>
I had someone ask me a while ago why the his code was throwing a compilation error,
it turned out that although he had named the DLL <em>MyDLL</em>, the namespaces within
the DLL he wanted to reference was<em> MyNamesapce</em> so how can you identify the
namespace?
</p>
        <p>
The easiest way to do this is to use something called the Object Explorer, this should
list all the referenced DLLs for a given project and allow you to navigate the namespaces,
classes and objects within the class. To open the Object Explorer click on the View
menu and then “Object Explorer” within the “Windows” menu. Navigating the DLL is easy,
you can either search through it using the search box at the top or alternatively
navigate using the object tree.
</p>
        <ul class="photoList">
          <li>
            <a title="Visual Studio 2003 object explorer in the view menu" href="/tim/img/Visual-Studio-2003-add-a-reference-object-explorer.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2003<img alt="Visual Studio 2003 object explorer in the view menu" src="/tim/img/tn_Visual-Studio-2003-add-a-reference-object-explorer.png" /></a>
          </li>
          <li>
            <a title="Visual Studio 2003 the object explorer" href="/tim/img/Visual-Studio-2003-add-a-reference-identifying-a-namespace.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2003<img alt="Visual Studio 2003 the object explorer" src="/tim/img/tn_Visual-Studio-2003-add-a-reference-identifying-a-namespace.png" /></a>
          </li>
        </ul>
        <div style="clear: left">
        </div>
        <ul class="photoList">
          <li>
            <a title="Visual Studio 2005 oject explorer in the view menu" href="/tim/img/Visual-Studio-2005-add-a-reference-object-explorer.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2005<img alt="Visual Studio 2005 oject explorer in the view menu" src="/tim/img/tn_Visual-Studio-2005-add-a-reference-object-explorer.png" /></a>
          </li>
          <li>
            <a title="Visual Studio 2005 the object explorer" href="/tim/img/Visual-Studio-2005-add-a-reference-identifying-a-namespace.png" rel="lightbox[Adding-References-in-Visual-Studio]">Visual
Studio 2005<img alt="Visual Studio 2005 the object explorer" src="/tim/img/tn_Visual-Studio-2005-add-a-reference-identifying-a-namespace.png" /></a>
          </li>
        </ul>
        <div style="clear: left">
        </div>
        <p>
The best way to work out what declaration you need to add is to locate the object,
method or control you plan on using either using the tree navigation or searching,
then selecting it. Once selected you will notice the bottom pane of the Object Explorer
will change and the namespace will be listed, this is what you need to add as your
reference. If you need to enter the assembly name, you can identify this easily as
it’s the name given to the top node of the tree –this should have a little grey icon
next to it. 
</p>
        <h2>If the DLL is adding a control to the page
</h2>
        <p>
You’ll need to reference the namespace at the top of the page like this:
</p>
        <div class="code">
          <img src="/img/sc/clear.gif" align="top" />
          <span style="background-color: #ffff00">&lt;%</span>
          <span style="color: #0000ff">@</span> <span style="color: #8b0000">Register</span> <span style="color: #ff0000">TagPrefix</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"TSD"</span><span style="color: #ff0000"> Namespace</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"TheSiteDoctor.WebControls"</span><span style="color: #ff0000"> Assembly</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"TheSiteDoctor"</span> <span style="background-color: #ffff00">%&gt;</span></div>
        <p>
You can use whatever prefix you like for the control, I tend to keep it between 2
and 4 characters in length for ease i.e. “TSD” but that’s up-to-you. Adding the control
is done in the same way you add the standard controls:
</p>
        <div class="code">
          <img src="/img/sc/clear.gif" align="top" />
          <span style="color: #0000ff">&lt;</span>
          <span style="color: #8b0000">TSD:SuggestionTypeRadioButtonList</span>
          <span style="color: #ff0000"> runat</span>
          <span style="color: #8b0000">=</span>
          <span style="color: #0000ff">"</span>
          <span style="color: #0000ff">server</span>
          <span style="color: #0000ff">"</span>
          <span style="color: #ff0000"> ID</span>
          <span style="color: #8b0000">=</span>
          <span style="color: #0000ff">"</span>
          <span style="color: #0000ff">radCategories</span>
          <span style="color: #0000ff">"</span>
          <span style="color: #ff0000"> CssClass</span>
          <span style="color: #8b0000">=</span>
          <span style="color: #0000ff">"</span>
          <span style="color: #0000ff">inputRadio</span>
          <span style="color: #0000ff">"</span>
          <span style="color: #ff0000"> ValidationGroup</span>
          <span style="color: #8b0000">=</span>
          <span style="color: #0000ff">"</span>
          <span style="color: #0000ff">suggestion</span>
          <span style="color: #0000ff">"</span> <span style="color: #0000ff">/&gt;</span></div>
        <p>
You’re all set :)
</p>
        <p>
If however this is a control set that you plan on re-using throughout the application
I would opt to add a reference within the web.config, this means you don’t need to
repeatidly add the reference for each page. To do this you’ll need to add the following
to your web.config file:
</p>
        <div class="code">
          <img src="/img/sc/clear.gif" align="top" />
          <span style="color: #0000ff">&lt;</span>
          <span style="color: #8b0000">system.web</span>
          <span style="color: #0000ff">&gt;</span>
          <br />
          <img src="/img/sc/clear.gif" align="top" />   <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">pages</span><span style="color: #ff0000"> validateRequest</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"false"&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />     <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">controls</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />       <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">add</span><span style="color: #ff0000"> tagPrefix</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"TSD"</span><span style="color: #ff0000"> namespace</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"TheSiteDoctor.WebControls"</span><span style="color: #ff0000"> assembly</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"TheSiteDoctor"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />     <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/controls</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />   <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/pages</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/system.web</span><span style="color: #0000ff">&gt;</span></div>
        <h2>If the DLL is adding functionality to the codebehind or you want to use the control
within the codebehind
</h2>
        <p>
If you want to use the control or add the control to the page dynamically you will
need to include a reference to the namespace within the codebehind –in the same way
you do the System namespaces. This is really simple, at the top of the page you should
see a few “using” statements or in VB “Imports”, you’ll just need to add the referenced
DLLs namespace below (or above –or- in the middle!) of these others, as long as it’s
with the other statements you’ll be fine. You can then reference the various methods
and properties of the control.
</p>
        <div class="code">
          <img src="/img/sc/clear.gif" align="top" />
          <span style="color: #0000ff">using</span> TheSiteDoctor.WebControls;<br /><img src="/img/sc/clear.gif" align="top" /><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">public</span> partial <span style="color: #0000ff">class</span> <span style="color: #008b8b">SuggestionsPage</span> : System.Web.UI.<span style="color: #008b8b">Page</span><br /><div id="closed633069936188750000_4" style="display: none"><img onclick="showHideCodeDiv('633069936188750000_4', false)" src="/img/sc/PlusNoLines.gif" align="top" /><b><span style="color: #00008b">{...}</span></b></div><div id="open633069936188750000_4" style="display: block"><img onclick="showHideCodeDiv('633069936188750000_4', true)" src="/img/sc/minusNoTopLine.gif" align="top" />{<br /><img src="/img/sc/I.gif" align="top" />    <span style="color: #0000ff">protected</span> <span style="color: #0000ff">void</span> btnAddEntry_Click(<span style="color: #0000ff">object</span> sender, <span style="color: #008b8b">EventArgs</span> e)<br /><div id="closed633069936188750000_6" style="display: none"><img onclick="showHideCodeDiv('633069936188750000_6', false)" src="/img/sc/plus.gif" align="top" />    <b><span style="color: #00008b">{...}</span></b></div><div id="open633069936188750000_6" style="display: block"><img onclick="showHideCodeDiv('633069936188750000_6', true)" src="/img/sc/minus.gif" align="top" />    {<br /><img src="/img/sc/I.gif" align="top" />        <span style="color: #0000ff">int</span> cat = radCategories.CategoryId;<br /><img src="/img/sc/I.gif" align="top" /><br /><img src="/img/sc/I.gif" align="top" />        <span style="color: #008000">//</span><span style="color: #008000">Do</span> <span style="color: #008000">something</span> <span style="color: #008000">with</span> <span style="color: #008000">it</span> <span style="color: #008000">here...</span><br /><img src="/img/sc/L.gif" align="top" />    }
</div><img src="/img/sc/L.gif" align="top" />}
</div></div>
        <p>
I hope that helps you getting started with this new way of importing common code,
it’s fairly intuitive once you’ve done it once or twice, but those first few “Could
not find xyz –Are you missing an Assembly or Reference” messages do drive you nuts
;)
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=9fe84fb1-2861-42c3-bc1e-6d059b696909" />
      </body>
      <title>Importing/Referencing DLLs in Visual Studio</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,9fe84fb1-2861-42c3-bc1e-6d059b696909.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2007/02/13/ImportingReferencingDLLsInVisualStudio.aspx</link>
      <pubDate>Tue, 13 Feb 2007 20:03:03 GMT</pubDate>
      <description>&lt;p&gt;
A couple of people have got stuck on various lists/forums I’m on moving from ASP to
ASP.Net and the differences there are, the one first major sticking point I had was
referencing DLLs –so don’t worry you’re not the only one! So this is a really simple
look at what you need to look at and how you reference DLLs –if you’ve ever added
a DLL before you’ll probably find that this is too simplistic for you but read on
anyway!&lt;br&gt;
Firstly, referencing a DLL is basically a way of including someone else’s code within
your project (or a common codebase that you re-use), this also includes controls,
useful/common functions or just additional functionality such as Crystal reports.&lt;br&gt;
Before you can use someone else’s code (i.e. Phil Whinstanley’s error reporting class)
within your code you have to include a reference to the relevant DLL. The first thing
I would do is create a folder somewhere that’s easily accessible to all machines that
may need to reference the DLL i.e. “c:\Useful DLLs\”. Then, within this folder, I
would create the following sub folders:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
c:\Useful DLLs\.Net 1.1 
&lt;li&gt;
c:\Useful DLLs\.Net 2.0 
&lt;li&gt;
c:\Useful DLLs\.Net 3.0 
&lt;li&gt;
c:\Useful DLLs\ASP.Net 1.1 
&lt;li&gt;
c:\Useful DLLs\ASP.Net 2.0 
&lt;li&gt;
c:\Useful DLLs\ASP.Net 3.0 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
This is something that I’ve only recently started doing after having multiple releases
for the same DLL. For each DLL place a copy within the relevant folder.&lt;br&gt;
Next, load your project within Visual Studio, right click the solution (this is the
very top of the tree) and select “Add Reference":
&lt;/p&gt;
&lt;ul class="photoList"&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2003 add a reference context menu" href="/tim/img/Visual-Studio-2003-add-a-reference-context-menu.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2003&lt;img alt="Visual Studio 2003 add a reference context menu" src="/tim/img/tn_Visual-Studio-2003-add-a-reference-context-menu.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2005 add a reference context menu" href="/tim/img/Visual-Studio-2005-add-a-reference-context-menu.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2005&lt;img alt="Visual Studio 2005 add a reference context menu" src="/tim/img/tn_Visual-Studio-2005-add-a-reference-context-menu.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="clear: left"&gt;
&lt;/div&gt;
&lt;p&gt;
A window will then popup that looks something like this:
&lt;/p&gt;
&lt;ul class="photoList"&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2003 add a reference window" href="/tim/img/Visual-Studio-2003-add-a-reference.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2003&lt;img alt="Visual Studio 2003 add a reference window" src="/tim/img/tn_Visual-Studio-2003-add-a-reference.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2005 add a reference window" href="/tim/img/Visual-Studio-2005-add-a-reference.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2005&lt;img alt="Visual Studio 2005 add a reference window" src="/tim/img/tn_Visual-Studio-2005-add-a-reference.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="clear: left"&gt;
&lt;/div&gt;
&lt;p&gt;
Depending on what sort of reference this is, the majority of the time I would expect
you’ll be needing to use the “Browse” tab –this allows you to navigate the FSO and
find the DLL to reference (which should be somewhere in c:\useful dlls\). Once you’ve
found it select the DLL and click Add.
&lt;/p&gt;
&lt;p&gt;
Your DLL is now referenced and you should be able to start using it straight away.
Depending on what you need to do with it you’ll also need to add Page and/or Codebehind
imports. To check that it has imported correctly, in Visual Studio 2003 you should
be able to see it in the references folder or in Visual Studio 2005 you will need
to click into the "Class View" tab of the Solution explorer: 
&lt;/p&gt;
&lt;ul class="photoList"&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2003 checking the reference is ok" href="/tim/img/Visual-Studio-2003-add-a-reference-dll-added.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2003&lt;img alt="Visual Studio 2003 checking the reference is ok" src="/tim/img/tn_Visual-Studio-2003-add-a-reference-dll-added.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2005 checking the reference is ok" href="/tim/img/Visual-Studio-2005-add-a-reference-dll-added.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2005&lt;img alt="Visual Studio 2005 checking the reference is ok" src="/tim/img/tn_Visual-Studio-2005-add-a-reference-dll-added.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="clear: left"&gt;
&lt;/div&gt;
&lt;h2&gt;How do I identify the namespace?
&lt;/h2&gt;
&lt;p&gt;
I had someone ask me a while ago why the his code was throwing a compilation error,
it turned out that although he had named the DLL &lt;em&gt;MyDLL&lt;/em&gt;, the namespaces within
the DLL he wanted to reference was&lt;em&gt; MyNamesapce&lt;/em&gt; so how can you identify the
namespace?
&lt;/p&gt;
&lt;p&gt;
The easiest way to do this is to use something called the Object Explorer, this should
list all the referenced DLLs for a given project and allow you to navigate the namespaces,
classes and objects within the class. To open the Object Explorer click on the View
menu and then “Object Explorer” within the “Windows” menu. Navigating the DLL is easy,
you can either search through it using the search box at the top or alternatively
navigate using the object tree.
&lt;/p&gt;
&lt;ul class="photoList"&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2003 object explorer in the view menu" href="/tim/img/Visual-Studio-2003-add-a-reference-object-explorer.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2003&lt;img alt="Visual Studio 2003 object explorer in the view menu" src="/tim/img/tn_Visual-Studio-2003-add-a-reference-object-explorer.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2003 the object explorer" href="/tim/img/Visual-Studio-2003-add-a-reference-identifying-a-namespace.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2003&lt;img alt="Visual Studio 2003 the object explorer" src="/tim/img/tn_Visual-Studio-2003-add-a-reference-identifying-a-namespace.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="clear: left"&gt;
&lt;/div&gt;
&lt;ul class="photoList"&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2005 oject explorer in the view menu" href="/tim/img/Visual-Studio-2005-add-a-reference-object-explorer.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2005&lt;img alt="Visual Studio 2005 oject explorer in the view menu" src="/tim/img/tn_Visual-Studio-2005-add-a-reference-object-explorer.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a title="Visual Studio 2005 the object explorer" href="/tim/img/Visual-Studio-2005-add-a-reference-identifying-a-namespace.png" rel="lightbox[Adding-References-in-Visual-Studio]"&gt;Visual
Studio 2005&lt;img alt="Visual Studio 2005 the object explorer" src="/tim/img/tn_Visual-Studio-2005-add-a-reference-identifying-a-namespace.png"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="clear: left"&gt;
&lt;/div&gt;
&lt;p&gt;
The best way to work out what declaration you need to add is to locate the object,
method or control you plan on using either using the tree navigation or searching,
then selecting it. Once selected you will notice the bottom pane of the Object Explorer
will change and the namespace will be listed, this is what you need to add as your
reference. If you need to enter the assembly name, you can identify this easily as
it’s the name given to the top node of the tree –this should have a little grey icon
next to it. 
&lt;/p&gt;
&lt;h2&gt;If the DLL is adding a control to the page
&lt;/h2&gt;
&lt;p&gt;
You’ll need to reference the namespace at the top of the page like this:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="background-color: #ffff00"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color: #0000ff"&gt;@&lt;/span&gt;&amp;nbsp;&lt;span style="color: #8b0000"&gt;Register&lt;/span&gt;&amp;nbsp;&lt;span style="color: #ff0000"&gt;TagPrefix&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"TSD"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;Namespace&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"TheSiteDoctor.WebControls"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;Assembly&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"TheSiteDoctor"&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #ffff00"&gt;%&amp;gt;&lt;/span&gt; 
&lt;/div&gt;
&lt;p&gt;
You can use whatever prefix you like for the control, I tend to keep it between 2
and 4 characters in length for ease i.e. “TSD” but that’s up-to-you. Adding the control
is done in the same way you add the standard controls:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;TSD:SuggestionTypeRadioButtonList&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;runat&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;server&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;ID&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;radCategories&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;CssClass&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;inputRadio&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;ValidationGroup&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;suggestion&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;
You’re all set :)
&lt;/p&gt;
&lt;p&gt;
If however this is a control set that you plan on re-using throughout the application
I would opt to add a reference within the web.config, this means you don’t need to
repeatidly add the reference for each page. To do this you’ll need to add the following
to your web.config file:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;pages&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;validateRequest&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"false"&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;controls&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;add&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;tagPrefix&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"TSD"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;namespace&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"TheSiteDoctor.WebControls"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;nbsp;assembly&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"TheSiteDoctor"&lt;/span&gt;&amp;nbsp;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/controls&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/pages&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;h2&gt;If the DLL is adding functionality to the codebehind or you want to use the control
within the codebehind
&lt;/h2&gt;
&lt;p&gt;
If you want to use the control or add the control to the page dynamically you will
need to include a reference to the namespace within the codebehind –in the same way
you do the System namespaces. This is really simple, at the top of the page you should
see a few “using” statements or in VB “Imports”, you’ll just need to add the referenced
DLLs namespace below (or above –or- in the middle!) of these others, as long as it’s
with the other statements you’ll be fine. You can then reference the various methods
and properties of the control.
&lt;/p&gt;
&lt;div class="code"&gt;&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&amp;nbsp;TheSiteDoctor.WebControls;&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&amp;nbsp;partial&amp;nbsp;&lt;span style="color: #0000ff"&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style="color: #008b8b"&gt;SuggestionsPage&lt;/span&gt;&amp;nbsp;:&amp;nbsp;System.Web.UI.&lt;span style="color: #008b8b"&gt;Page&lt;/span&gt;
&lt;br&gt;
&lt;div id="closed633069936188750000_4" style="display: none"&gt;&lt;img onclick="showHideCodeDiv('633069936188750000_4', false)" src="/img/sc/PlusNoLines.gif" align="top"&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div id="open633069936188750000_4" style="display: block"&gt;&lt;img onclick="showHideCodeDiv('633069936188750000_4', true)" src="/img/sc/minusNoTopLine.gif" align="top"&gt;{&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;&amp;nbsp;btnAddEntry_Click(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt;&amp;nbsp;sender,&amp;nbsp;&lt;span style="color: #008b8b"&gt;EventArgs&lt;/span&gt;&amp;nbsp;e)&lt;br&gt;
&lt;div id="closed633069936188750000_6" style="display: none"&gt;&lt;img onclick="showHideCodeDiv('633069936188750000_6', false)" src="/img/sc/plus.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style="color: #00008b"&gt;{...}&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div id="open633069936188750000_6" style="display: block"&gt;&lt;img onclick="showHideCodeDiv('633069936188750000_6', true)" src="/img/sc/minus.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;nbsp;cat&amp;nbsp;=&amp;nbsp;radCategories.CategoryId;&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;
&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #008000"&gt;//&lt;/span&gt;&lt;span style="color: #008000"&gt;Do&lt;/span&gt;&amp;nbsp;&lt;span style="color: #008000"&gt;something&lt;/span&gt;&amp;nbsp;&lt;span style="color: #008000"&gt;with&lt;/span&gt;&amp;nbsp;&lt;span style="color: #008000"&gt;it&lt;/span&gt;&amp;nbsp;&lt;span style="color: #008000"&gt;here...&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/L.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&lt;/div&gt;
&lt;img src="/img/sc/L.gif" align="top"&gt;}
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
I hope that helps you getting started with this new way of importing common code,
it’s fairly intuitive once you’ve done it once or twice, but those first few “Could
not find xyz –Are you missing an Assembly or Reference” messages do drive you nuts
;)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=9fe84fb1-2861-42c3-bc1e-6d059b696909" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,9fe84fb1-2861-42c3-bc1e-6d059b696909.aspx</comments>
      <category>ASP.Net</category>
      <category>Software/Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=5f288316-c29b-4242-8d01-77ad3ded87c8</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,5f288316-c29b-4242-8d01-77ad3ded87c8.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,5f288316-c29b-4242-8d01-77ad3ded87c8.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=5f288316-c29b-4242-8d01-77ad3ded87c8</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <title>Web.Config, Visual Studio and Intellisense Issues</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,5f288316-c29b-4242-8d01-77ad3ded87c8.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2007/01/05/WebConfigVisualStudioAndIntellisenseIssues.aspx</link>
      <pubDate>Fri, 05 Jan 2007 02:57:57 GMT</pubDate>
      <description>&lt;p&gt;
I&amp;rsquo;m not sure how many people this applies to but a while ago I found I was loosing &lt;acronym title="Visual Studio"&gt;VS&lt;/acronym&gt;2005
IntelliSense when I was working in my web.config. More specifically I lost IntelliSense
after editing any of the site&amp;rsquo;s settings using the Web Site Administration Tool
in ASP.Net 2.0.
&lt;/p&gt;
&lt;p&gt;
I quickly realised that the issue was being caused because the Web Site Administration
Tool updates the root element (&amp;lt;configuration&amp;gt;) of your Web.Config file to include
an attribute of &amp;ldquo;xmlns&amp;rdquo;. If you&amp;rsquo;re loosing IntelliSense, just delete
the attribute and you&amp;rsquo;ll have it back in a tick :) 
&lt;/p&gt;
&lt;div class="code"&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;configuration&lt;/span&gt;&lt;span style="color:#ff0000"&gt;&amp;nbsp;xmlns&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"&lt;/span&gt;&lt;span style="color:#0000ff"&gt;http://schemas.microsoft.com/.NetConfiguration/v2.0&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;p&gt;
Should be:
&lt;/p&gt;
&lt;div class="code"&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;configuration&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;p&gt;
p.s. Yes Doug, I can already hear you crying out &amp;ldquo;Not for me &amp;ndash;I don&amp;rsquo;t
use &lt;acronym title="Visual Studio"&gt;VS&lt;/acronym&gt;&amp;rdquo; &lt;b&gt;*yawn*&lt;/b&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=5f288316-c29b-4242-8d01-77ad3ded87c8" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,5f288316-c29b-4242-8d01-77ad3ded87c8.aspx</comments>
      <category>ASP.Net</category>
      <category>Software/Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=84dfc930-b0b6-47e0-b942-8a26c38cc152</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,84dfc930-b0b6-47e0-b942-8a26c38cc152.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,84dfc930-b0b6-47e0-b942-8a26c38cc152.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=84dfc930-b0b6-47e0-b942-8a26c38cc152</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
On surfing around the net the other day looking for a replacement to Visual Studio
2003’s clipboard monitor I stumbled across this <a href="http://www.csharper.net/blog/clipboard_manager_upgraded_to_package.aspx">excellent
Clipboard manager plug-in for Visual Studio 2005</a>. As his blog was offline at the
time I wasn’t sure exactly how to use it but now I’ve had a play I’m not sure I’ll
be able to do without it!
</p>
        <p>
Check out the <a href="http://www.csharper.net/blog/clipboard_manager_upgraded_to_package.aspx">Clipboard
Manager</a> plug-in at<br /><a href="http://www.csharper.net/blog/clipboard_manager_upgraded_to_package.aspx">http://www.csharper.net/blog/clipboard_manager_upgraded_to_package.aspx</a></p>
        <p>
For those of you interested, the plug-in monitors the clipboard activity allowing
you to resurrect previous clipboards and make them current and even locking items
so you can use them at a later date. I’ve found it incredibly useful when testing
sites as it allows me to keep common messages on the clip. Downside is you have to
have Visual Studio open at the time so I’ll have to look into a standalone version.
</p>
        <p>
Here are a few shots of it in “action”:
</p>
        <p>
          <img src="img/ClipboardManager.jpg" alt="Visual Studio Clipboard Manager Plugin" height="322" width="472" />
        </p>
        <p>
The items that have been added to the clipboard in the past show up in the list at
the top and there's a small preview window below (which I think you can select parts
out of). You can also remove all items from the history by clicking the icon in the
top left. 
</p>
        <p>
          <img src="img/ClipboardManagerHistoryRestored.jpg" alt="Visual Studio Clipboard Manager Plugin" height="323" width="473" />
        </p>
        <p>
To re-select an old item double click it and it's instantly the main item! The currently
selected item is the one in black text with a green arrow next to it.
</p>
        <p>
          <img src="img/ClipboardManagerContextMenu.jpg" alt="Visual Studio Clipboard Manager Plugin" height="324" width="471" />
        </p>
        <p>
The context menu offers a number of extra options including the ability to lock and
unlock an item, this means when you restart your computer the item is still in the
history -great if you have common items such as test credit card numbers! If you want
to remove a single item from the history, you can do that using the context menu too.
I've not yet used the "Save to File" or "Search Online" items. 
</p>
        <p>
          <strong>Update:</strong> There does seem to be some sort of glitch with it, I think
my history has got corrupt at somepoint so when I clear all the unlocked items new
items weren’t getting caught anymore. I've found two solutions: The first is to restart
Visual Studio, the other is to unlock all items and clear the history completely.
This seemed to sort it. I did also note that I had one blank item at the top of the
list so I guess that's what was causing it. 
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=84dfc930-b0b6-47e0-b942-8a26c38cc152" />
      </body>
      <title>Useful Visual Studio Plugin</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,84dfc930-b0b6-47e0-b942-8a26c38cc152.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2006/09/30/UsefulVisualStudioPlugin.aspx</link>
      <pubDate>Sat, 30 Sep 2006 18:13:45 GMT</pubDate>
      <description>&lt;p&gt;
On surfing around the net the other day looking for a replacement to Visual Studio
2003’s clipboard monitor I stumbled across this &lt;a href="http://www.csharper.net/blog/clipboard_manager_upgraded_to_package.aspx"&gt;excellent
Clipboard manager plug-in for Visual Studio 2005&lt;/a&gt;. As his blog was offline at the
time I wasn’t sure exactly how to use it but now I’ve had a play I’m not sure I’ll
be able to do without it!
&lt;/p&gt;
&lt;p&gt;
Check out the &lt;a href="http://www.csharper.net/blog/clipboard_manager_upgraded_to_package.aspx"&gt;Clipboard
Manager&lt;/a&gt; plug-in at&lt;br&gt;
&lt;a href="http://www.csharper.net/blog/clipboard_manager_upgraded_to_package.aspx"&gt;http://www.csharper.net/blog/clipboard_manager_upgraded_to_package.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
For those of you interested, the plug-in monitors the clipboard activity allowing
you to resurrect previous clipboards and make them current and even locking items
so you can use them at a later date. I’ve found it incredibly useful when testing
sites as it allows me to keep common messages on the clip. Downside is you have to
have Visual Studio open at the time so I’ll have to look into a standalone version.
&lt;/p&gt;
&lt;p&gt;
Here are a few shots of it in “action”:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="img/ClipboardManager.jpg" alt="Visual Studio Clipboard Manager Plugin" height="322" width="472"&gt;
&lt;/p&gt;
&lt;p&gt;
The items that have been added to the clipboard in the past show up in the list at
the top and there's a small preview window below (which I think you can select parts
out of). You can also remove all items from the history by clicking the icon in the
top left. 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="img/ClipboardManagerHistoryRestored.jpg" alt="Visual Studio Clipboard Manager Plugin" height="323" width="473"&gt;
&lt;/p&gt;
&lt;p&gt;
To re-select an old item double click it and it's instantly the main item! The currently
selected item is the one in black text with a green arrow next to it.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="img/ClipboardManagerContextMenu.jpg" alt="Visual Studio Clipboard Manager Plugin" height="324" width="471"&gt;
&lt;/p&gt;
&lt;p&gt;
The context menu offers a number of extra options including the ability to lock and
unlock an item, this means when you restart your computer the item is still in the
history -great if you have common items such as test credit card numbers! If you want
to remove a single item from the history, you can do that using the context menu too.
I've not yet used the "Save to File" or "Search Online" items. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update:&lt;/strong&gt; There does seem to be some sort of glitch with it, I think
my history has got corrupt at somepoint so when I clear all the unlocked items new
items weren’t getting caught anymore. I've found two solutions: The first is to restart
Visual Studio, the other is to unlock all items and clear the history completely.
This seemed to sort it. I did also note that I had one blank item at the top of the
list so I guess that's what was causing it. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=84dfc930-b0b6-47e0-b942-8a26c38cc152" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,84dfc930-b0b6-47e0-b942-8a26c38cc152.aspx</comments>
      <category>Software</category>
      <category>Software/Visual Studio</category>
    </item>
  </channel>
</rss>