Error installing the Windows Azure AppFabric Tools for Visual Studio (CTP)

Windows Server AppFabric is installed and is not compatible with this release of Windows Azure AppFabric Developer Tools for Microsoft Visual Studio 2010 - June 2011 CTP. Please uninstall Windows Server AppFabric and rerun this setup if you want to install Windows Azure AppFabric Developer Tools for Microsoft Visual Studio 2010 - June 2011 CTP.When installing the Windows Azure AppFabric Tools for Visual Studio (found here), you might get the error message shown on the right, stating that Windows Server AppFabric is installed and that it is not compatible with this release of Windows Azure AppFabric Developer Tools for Microsoft Visual Studio 2010 – June 2011 CTP. It asks to uninstall Windows Server AppFabric and rerun this setup if you want to install Windows Azure AppFabric Developer Tools for Microsoft Visual Studio 2010 – June 2011 CTP.

When looking for the install of ‘Windows Server AppFabric’ to remove it through ‘Uninstall a program’ you won’t find this item in the list of installed programs. This might feel as a big problem heading your way…

Solution
This is, however, only a small problem on your way to Azure AppFabric development. Go to your list of installed programs and click ‘View installed updates’. Under Windows, you will find the update ‘Windows Server AppFabric (KB970622)’. Uninstall the update, restart your machine and try installing the Windows Azure AppFabric Tools for Visual Studio again…

Enjoy!

The Visual Studio 2010 Test Client for WCF services

When writing WCF services, most of us find ourselves writing quick test applications. To give you more time to do what a developer should be doing (adding business value to the project) the Visual Studio team added a WCF test client that can help you reach goals faster.

This is not a very difficult application, but it does the trick and is more than sufficient for simple testing. The WCF Test Client can be found at this location (without the ‘ (x86)’ for x86 machines): C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE.

Taken from the help:

Windows Communication Foundation (WCF) Test Client (WcfTestClient.exe) is a GUI tool that allows users to input test parameters, submit that input to the service, and view the response that the service sends back. It provides a seamless service testing experience when combined with WCF Service Host.

WCF Test Client screenshots:
image image

Updated: Thanks to Marco for pointing out my typo…!

HowTo: open all files from the Find Results window

Here’s a quick Visual Studio tip for you…

I frequently search for a specific text in my solution because I need to do something in all places where that text occurs. Today I found out how you can open all the files that are mentioned in the Find Results window.

Search for the text you’re looking for. In my case this is ITest*.
Open up the Search Results window and select all the records where the text was found. You can do this by dragging your mouse cursor over the text or clicking the text of the first search result, holding SHIFT and clicking the text of the last.
Search Results for ITest

Right click anywhere on the selected text and choose ‘Go to location’. If you click anywhere other than on selected text, you will lose the selection and you’ll probably get just one file opened. When all files are opened you will keep the ‘Go To Next Location F8’ and ‘Go To Previous Location SHIFT + F8’ functionality. That might be a nice one to loop through all the locations where your text was found. Especially when it was found more than once in one file.

Hope this helps.

 

* The usefulness of searching for this interface is arbitrary due to functionality as ‘Find all references’ and so on. Luckily I’m only using it for this example. So lets not focus on that but on the tip this post is about ;)

Patches available for scrolling context menu in Visual Studio 2010

The past couple of days I’ve been experiencing some issues with the context menu for my Solution Explorer in Visual Studio 2010. It contained scrollbars even when there was sufficient space on the screen to show the menu without scrolling.

Searching for that issue I immediately found this blog post on The Visual Studio Blog. Taken from that post:

We’re pleased to announce that there are patches available for Visual Studio and Windows Presentation Foundation that fix this problem. You will need to install both patches to fix this issue

  1. Visual Studio 2010 patch: http://code.msdn.microsoft.com/KB2345133
  2. Windows Presentation Foundation 4.0 patch: http://code.msdn.microsoft.com/KB2413613
    1. X86: NDP40-KB2413613-x86.exe.
    2. X64: NDP40-KB2413613-x64.exe.

I installed both patches and find Visual Studio no longer shows scrollbars in my context menu when I don’t need ‘em. Next to that I am now able to scroll through the menu (when using scrollbars) by using the mousewheel. I think this didn’t work before the patches, but I can’t test my ‘before’ situation anymore…

Hope this helps.

HowTo: have Visual Studio open XAML documents in code view

Just a small post to start the new year… and let it be a good one!

When opening a XAML document in Visual Studio, it opens in split view by default. This might become annoying when you have a large XAML document, because all the content needs to be rendered before you can get some work done.

Here’s how you can have Visual Studio open XAML documents in code view:

  • Go to Tools, Options
  • Under Text Editor open the XAML section and select Miscellaneous
  • Under Default View check the Always open documents in full XAML view box (see image below)
  • Click OK to apply and you’re all done!

Hope this helps.

fullxamlview

"AjaxControlToolkit is undefined"

Because we were still using an old Visual Studio 2005 solution which included a Web Site project, it was time to upgrade. We upgraded our Visual Studio 2005 solution to Visual Studio 2010 (and .NET 4.0), converted the Web Site Project to a Web Application Project and then, of course, the AjaxControlToolkit had to follow. I downloaded the latest build from their Codeplex site and updated the references in the different projects. I ran the website, and that’s where things got ugly…

Most pages worked nicely, but there were a few that gave an “AjaxControlToolkit is undefined” error. I removed all references to the AjaxControlToolkit, removed all the old versions of it from my machine, referenced the most recent version again, all to no avail. After Googling* Binging the error I found a LOT of possible solutions. These included:

  • Use the ToolkitScriptManager from the AjaxControlToolkit in stead of the built-in ScriptManager
  • When using the ToolkitScriptManager, set CombineScripts to false
  • When using the ToolkitScriptManager, set EnablePartialRendering to true
  • Clear the browser cache
  • Clear the ASP.NET Temporary Files directory
  • Use a (dummy) control to make sure the JavaScript files have been loaded correctly

Unfortunately, none of these possible solutions helped us with our specific problem. Our problem occurred when we, for instance, set the PositioningMode for a control from custom JavaScript using the AjaxControlToolkit.PositioningMode enumeration. The error was always from custom JavaScript. After looking around a bit more I found one site that mentioned something about changing the AjaxControlToolkit ‘namespace’ in JavaScript.  After playing around a bit I found out that changing the use of AjaxControlToolkit.XXX to System.Extended.UI.XXX provided the solution.

Hope this helps.

* Of course this is a weak attempt at a joke, but fact is that Google (the first 7 or so pages) only pointed me in the direction of the solutions that weren’t solutions for my situation. When I tried Bing for a change, I found something that put me on the right track pretty fast. Kudos to Bing!

Visual Studio 2010: Close all documents

Sometimes it’s the little things that make you love a new product just a bit more.

I tend to close stuff I don’t use anymore fairly quickly. Sometimes I even close an Explorer window or an application right after I used it, only to find I need it again in a few moments… We all have our quirks, right ;)

While developing I regularly close all the documents I have open in Visual Studio, especially when I am done with a specific task. And most of the time, I like to collapse all the projects and their subfolders too to keep a tidy work environment. I also have the option ‘Track Active Item in Solution Explorer’ checked under ‘Tools’ – ‘Options’ – ‘Projects and solutions’ – ‘General’. Of course I have, I’d almost add…

In older versions of Visual Studio (while having the ‘Track Active Item in Solution Explorer’ option turned on) choosing the ‘Close all documents’ item in the ‘Windows’ menu after having collapsed all the projects lead to one project opening up again. That was the project with the document that was active just before closing all the documents. The ‘Track Active Item in Solution Explorer’ option seemed to squeeze in a ‘Look at that guy!’ just before all the documents actually closed, making Visual Studio open up the project and highlighting the file again. Although I knew this happened, I somehow kept to my usual routine of collapsing all the projects and their subfolders before closing all documents, with the same result each time: me closing that one project (or those seven subfolders) twice.

But…… no more in Visual Studio 2010! This newly built IDE seems to understand my way of work: no longer does Visual Studio (or the ‘Track Active Item in Solution Explorer option) open up the project of an active item when I choose ‘Close All Documents’. I’m not even sure if this was a specific choice or just a coincidental side-effect of the new IDE, but it makes me love Visual Studio 2010 just a bit more… :)

Visual Studio 2010 and the web.config

While working with Visual Studio 2010, a new feature caught my eye that isn’t communicated (strongly) in the “What’s new” lists you can find online. As part of the Visual Studio 2010 supports  multiple web.config files! Now we can create a separate web.config file for each configuration we have for our application. If you add a configuration through the configuration manager, you have the possibility to add a web.config file  for the new configuration too.

A web application gets two configurations by default: a Debug and a Release configuration. When opening the plus sign in front of the web.config file, two extra files appear: web.debug.config and web.release.config.  Depending on the active configuration, Visual Stusio selects the correct version.

The web.config file contains the default configuration. Configuration specific config files may add or remove settings or change current ones. This is done using simple transformation tags.

For more information on transformations have a look at: