Skip to main content

Posts

Showing posts from December, 2009

Where are the documents and reports tab in Visual Studio 2010 Web Access?

In Visual Studio Team Foundation Server 2010, the Team Web Access site is installed by default.  At first things looked fine when I browsed to our company’s TFS website: But after a few seconds, I realized that something was wrong. The Documents and Reports tabs are missing! I immediately started checking all the possible but everything looked fine to me. Some searching on the web brought me the answer. On the MSDN forum is mentioned that the Documents and Reports tabs are removed by design from Web Access 2010. The project team decided  that the Project Portal is the best place to work with documents and reports and provides better features that weren't available in Web Access.

Visual Studio Unit Tests fails to run

After debugging some unit tests, I couldn't rerun my tests. I get a big warning icon and a very useful message telling me that the tests were not executed. After scrolling through the endless list of test run details I found following error message at the bottom; “Code coverage collection error: The Visual Studio performance and coverage logging engine is already running on the computer. Therefore, the test run cannot continue. Close the pending performance or code coverage session and then rerun the tests.” The solution is to shutdown the VSPerfMon.Exe process which gets left in memory when you debug a unit test and stop the debugger before the test finishes. More information can be found here at Microsoft Connect

Can the ScrumMaster become an impediment?

A ScrumMaster as one of the most important roles in the scrum process. He is the advocator of Scrum inside the organization. He ensures smooth functioning of the team by eradicating impediments and keeping the team shielded from external distractions. Bur can it be that the Scrum Master becomes the biggest impediment? On InfoQ an interesting summary is written collecting a lot of posts around the possible failure of the ScrumMaster role. I especially think that the multiple hats most Scrum Masters have to wear make it very difficult to do their job well. Can you think of some reasons why being a ScrumMaster can be hard or even impossible?

UX Patterns Explorer

One resource to remember: Quince . A very nice Silverlight site with User Interface and Usability patterns, each with an informative description and a lot of samples.

Database query plans: why should you care?

One of the subjects that always returns when you start discussing with your database administrator about whether or not you should use stored procedures are Query Execution Plans. Damien Guard did a very good developer focused introduction to query plans . Go check it out!

Why don't I see traffic sent to http://localhost when using Fiddler

If you want to monitor the traffic to a locally hosted webservice/ website you can use Fiddler . Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. As Internet Explorer and the .NET Framework are hardcoded not to send requests for localhost through any proxies, and as a proxy, Fiddler will not receive such traffic. A simple workaround is to use your machine name as the hostname instead of localhost. So, for instance, rather than hitting http:// localhost /helloworldservice.svc , instead visit http:// machinename /helloworldservice.svc .  More info on the Fidller website .

Web deployment in Visual Studio 2010

With Visual Studio 2010 a new way of deploying your web applications becomes available. In Visual Studio you just have to create an MSDeploy package . This package can than be deployed on your IIS 6.0 and 7.0 webserver using a command-line tool called msdeploy.exe. It supports moving configuration, content, SSL certificates and other types of data associated with a web server. You can choose to sync a single site or the entire web server. Flexibility is guaranteed by using a customizable manifest file. You can also skip sites or other objects, or you can perform regular expression replacements during a sync (like changing the home directory on the destination machine). MSDeploy will make it easy to version your web applications (including allowing you to quickly roll back to previous versions), as well as automatically provision them across multiple servers.  It also enables the full automation of deployment tasks (including via both command-line and PowerShell scripting APIs). A

Visual Studio 2010 and .NET Framework 4 Beta period extended

Microsoft took a brave and (if you ask me)wise decision . They postponed the launch of Visual Studio 2010 and .NET Framework 4.0 for a few extra weeks based on some negative customer feedback about performance. As we are using VSTS 2010 Beta 2 and TFS 2010 Beta 2 today, I’ll have to agree that performance is still an issue. Especially our TFS environment gets unpredictable drops in performance. Not the best thing that can happen when you’re trying to get some code released… I hope that this will buy Microsoft some extra time to fix all this issues because I’m really loving all the new great features that come with the 2010 wave!

TFS 2010 TFSAdminUtil became TFSConfig

If you are using Team Foundation Server 2010 today and you’re looking for the very useful TFSAdminUtil command line tool, search no longer, because it’s no longer there. Instead there is a new tool available, the TFSConfig tool . It offers the same features as the TFSAdminUtil and many more…

ADO.NET Data Services update

The ADO.NET Data Services team announced that the “Data Services Update for .NET Framework 3.5 SP1” (formerly known as “ADO Data Services v1.5”) has been released and is available for download. If your target is Windows7 or Windows 2008 R2 you can pick it up here .  For all other OS versions you can get the release from here . The list of new features is great; projections, data binding, row count, enhanced blob support, and especially the new "Data Service Provider" Interfaces   look promising!

Linq to NHibernate

As you probably know there is already a Linq to NHibernate provider available but it’s functionality is rather limited and far from complete. In the meanwhile a separate project is going on where Steve Strong is building a new provider from scratch based on AST .  This provider will give a lot of extra functionalities and features. Today Steve announced the latest updates on his work and it looks very promising. I cannot wait to start replacing the current provider. Of course, this is all in the trunk, so anyone wanting to play either needs to get the trunk source and build it, or take the much easier option of having Horn do the work. Horn builds the trunk on a daily basis, so look for a package built after around 2300GMT on the 16/12/2009 (the package URL on Horn has the datetime stamp in it, so it's pretty easy to spot).

Help! Where is my Javascript Intellisense in Visual Studio 2010 Beta 2?

For a current project we are using the great JQuery libraries. As we are developing in Visual Studio 2010, I want to use the JavaScript Intellisense. But it failed to work… It looks like there is an issue somewhere with the default settings that get set when Visual Studio 2010 first installs. To get Intellisense to work again, reset Visual Studio settings (Tools | Import and Export Settings): then go ahead and reset to your preferred default profile. And voila, Intellisense in JavaScript is back.

Reading performance counters on remote machines

One of the nice features of the Performance Monitor tool is that you can read performance counters on remote machines. That is of course when it works! When I tried to monitor the performance counters on a remote computer in Perfmon, I received an error message that resembles the following: Unable to connect to machine To resolve this issue, check the following actions. Action  1: Verify that the Remote Registry service is running on the remote computer Click Start , click Run , type cmd, and then click OK . At the command prompt, type tasklist -svc, and then press ENTER. Verify that a Svchost.exe host process is running that has RemoteRegistry in the Services column. If the service is not running, go to step 3. At the command prompt, type net start RemoteRegistry, and then press ENTER. Action 2: Verify that you have the required permissions You must be a member of the Administrators group on the remote computer. If the remote computer is runnin

Fatal Execution Engine Error when calling a WCF service in IIS

If you like nasty errors, this is one! It means more or less that the .NET framework itself has crashed. I have not seen this kind of errors a lot(luckily). Everytime we called a specific service, we succeeded in crashing the .NET framework.  After some investigation, we started to suspect the usage of IEnumerable<T> in one of our services. And finding this MS Connect call confirmed this suspicion. The fault could be found in the DataContractSerializer class. Microsoft indicated that the DataContractSerializer issue is fixed in .NET 4.0, but there is not a hotfix available for .NET 3.5sp1 at this time. The workaround they proposed  was to place all assemblies that contain types "T" used in contracts that have IEnumerable<T> into the GAC.  (In other words, if your contract has IEnumerable<T> elements, then all types T have to be strong-named & in the GAC.) Why does this work?  The bug with DataContractSerializer apparently does not manifest it

Failing app pools after Windows update

Today I arrived at work noticing that ALL our IIS applications were failing. As this not only influences our test and production enviroment but also our TFS server, nobody was able to do any kind of work. After checking out the system logs, I saw that a lot of updates where installed last weekend. It seems that the applications pools were unable to start after applying KB 973917 on Windows Server 2003 to add support for Extended Protection in Windows Authentication . The root cause of this issue is machines being in an unsupported state where SP1 version of IIS binaries exist on an SP2 installation. Product support has released KB 2009746 on how to resolve this issue. The summary of the resolution is to reinstall SP2 to such machines to update all IIS binaries to the SP2 version. You can get SP2 for Windows Server 2003 from the appropriate link in the article here: http://support.microsoft.com/kb/889100

Remove a test case from the Visual Studio 2010 Test and Lab Manager

Together with our test team we’re trying the new Visual Studio 2010 Test and Lab Manager. One of the questions of our lead test manager was how he could remove some useless test cases. As test cases are represented by work items, the answer is not so easy. Work Items by nature can’t be removed and this remains the same in Visual Studio 2010. Although it’s a tad inconvenient, you can delete work items from TFS by installing the Team Foundation Server Power Tools . Of the many features available as part of the power tools, there is a command called destroywi that can be used to delete work items.  For example, to delete the work item ID 1234, use the command: 1: tfpt destroywi /server:tfs-dev /workitemid:1234 Use this feature at your own risk. Of course from a user perspective this is not the best solution. So better is to just delete the test case from the suite by selecting it, and press the delete key, or the delete button on the toolbar. You can then edit the test case, and mov

Step by step guide for building and publishing an extension in Visual Studio 2010

Visual Studio 2010 supports more platforms and languages out of the box than any previous version of Visual Studio. However, one of Visual Studio’s greatest strengths isn’t in what ships with it, but how it can be extended to meet your individual development needs. Visual Studio 2010 exposes new APIs for building your extension and provides an ecosystem for publishing, sharing, and finding new extensions. Quan To, a program manager for the Visual Studio Platform Team shows how easy it is to build and publish an extension in VS2010 .

Visual designer for NHibernate

NHibernate is a very powerful Object Relational Mapper (ORM). But for a beginning NHibernate user, things seem very complex. One of the difficult parts is the creation if XML  mapping definitions by hand, an error-prone and time-consuming task. Visual NHibernate makes it easier and quicker to create and maintain NHibernate projects - even very complex ones. Point it at your existing projects and start modelling them right away - visually. The current feature list(it’s still in beta) supports: Visually design and inspect all of NHibernate's mapping scenarios: Single entity to single database table Single entity to multiple database tables Single table to multiple entities Supports all NHibernate collection types: Sets Bags Lists Maps Supported mapping types: one-to-one one-to-many many-to-many Mappings can be: unidirectional bidirectional Visual NHibernate also supports Components. Download the free trial and s

Visual Studio 2010 SDK Beta 2

If you want to experiment with the new extensibility options (MEF intregation, Wix deployment, WPF support,…) in VS 2010, download the Visual Studio 2010 SDK . Thanks to the removal of  all the documentation from the binaries, it’s a much smaller download. The Visual Studio 2010 SDK includes project templates that help developers create tool windows, menu commands, isolated shell projects, and editor extensions. The editor extensions include text adornments, colorizers, and margins. It also includes build tasks that help developers build and debug extensions. Building and debugging are managed in a second instance of Visual Studio named the experimental instance. The experimental instance provides a test bed for extensions without changing the primary installation of Visual Studio.

Distributed Transaction Coordinator(DTC) and Windows Vista

At one of my clients, I have the ‘luck’ to work with a DB2 database environment. After upgrading my system to Vista, I saw this heuristic processing error below: [IBM][CLI Driver][DB2] SQL0998N Error occurred during transaction or heuristic processing. Reason Code = "16". Subcode = "3-8004D00E". SQLSTATE=58005 From previous experiences, I learned it is caused by the distributed transaction coordinator that is always used when you’re opening a DB2 transaction inside a transactionscope.  By default in Vista, MSDTC settings are all locked down.  A blog post here describes how to use the dcomcnfg command to enable Inbound, Outbound and enable XA Transactions.  Enabling XA transactions and both inbound and outbound connections solved the problem.

Code Kata

Software developers don’t practice enough. Most of our learning takes place on the job, which means that most of our mistakes get made there as well. Other creative professions practice: artists carry a sketchpad, musicians play technical pieces, poets constantly rewrite works. In karate, where the aim is to learn to spar or fight, most of a student’s time is spent learning and refining basic moves. The more formal of these exercises are called kata. Dave Thomas took the idea of coding practice and made a series of what he calls Code Kata, which are small, thought-provoking exercises that programmers can do in the language of their choice. Each kata emphasizes a specific technique or thought process, providing a concrete flexing of one’s mental muscles. All kata are available for free on his weblog ( http://codekata.pragprog.com/ ). On the weblog, you’ll also find links to a mailing list and to others’ solutions to the exercises along with discussion about how the problems were sol

No warning on missing comments

By default if documentation is enabled, Visual Studio will give you warnings for each public class, method, field and so on that’s not documented. This is certainly useful for places where you’re writing some complex logic, but for some other places in your code and for generated code documentation isn’t always necessary. You can let the compiler ignore certain warnings for specific parts of your code by adding a pragma to your code file. Pragmas are a way to communicate with the compiler from your code. C# have it as well though the standard compiler (csc.exe) only understands two commands, warning and checksum . The code below has a pragma added that tells the compiler not to raise warnings with id 1591 (missing comments) 1: #pragma warning disable 1591 To re-enable this warning after a code-block, you can add following pragma: 1: #pragma warning restore 1591

VS 2010 Lab management

One of the great new features in Visual Studio 2010 is "Lab Management".  It enables you to automate the setup and configuration of test environments, saving you a bunch of time doing it every time you have a new build you want to test.  Installing and configuring is not very easy, Microsoft did a lot of work to make it much easier to get up and going, but you will have to invest time and hardware to get everything up and running.  The lab management team did a blog series to help you: Part 1 – Installation:  http://blogs.msdn.com/lab_management/archive/2009/11/18/Getting-started-with-Lab-Management-_2800_Part-1_2900_.aspx Part 2 – Configuration: http://blogs.msdn.com/lab_management/archive/2009/11/18/getting-started-with-lab-management-part-2.aspx Part 3 – Configuration continued: http://blogs.msdn.com/lab_management/archive/2009/11/20/getting-started-with-lab-management-part-3.aspx Part 4 -  End to end workflow: http://blogs.msdn.com/lab_management/archive/2009/11

Let your code be in good shape – Fitnesse free ebook

If you care about testing and if you try to use practices like TDD tooling support can help a lot. One of the tools that’s out there is Fitnesse. Fitnesse is a tool build on top of the   Framework for Integrated Testing ( FIT ), an acceptance testing framework originally developed for Java by Ward Cunningham. One of the central ideas of FIT was to promote collaboration and allow customers and business analysts to write and verify tests.  FIT makes it easy to run tests, but does not provide a way to create them. The original idea was to write tests in Word, Excel, or any tool that can output HTML. FitNesse is a web wiki front-end to FIT developed by Robert Martin and Micah Martin from ObjectMentor. If you are interested in starting to use it, certainly check the free Fitnesse ebook .

What’s new for ClickOnce in Visual Studio 2010

ClickOnce deployment enables you to deploy self-updating Windows and console applications that can be installed, updated, and run from a Web site. For more information, see ClickOnce Security and Deployment . In Visual Studio 2010, there are some small but useful improvements. Starting in Visual Studio 2010, you can target .NET Framework 4 or multiple versions of the .NET Framework in your ClickOnce deployment. You can also troubleshoot installation issues by using enhanced logging and you can create a custom installer . For Office solution developers, there are additional ClickOnce enhancements, such as deploying multiple Office solutions in a single ClickOnce installer and performing additional actions after the ClickOnce installer is finished. For WPF XAML browser applications (XBAPs), you can request elevation of privileges with ClickOnce. For more information, see WPF XAML Browser Applications Overview . I especially like the custom installer option. Now you can implement

ASMX services and Self-Signed Certificates

When you try to call a web service that uses a self-signed certificate from a client application you get the following error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. This is because your system marks the certificate as invalid. There are 3 tests that must be checked before a certificate is marked as valid: The certificate must be issued by a trusted certification authority. The certificate is not outdated. The hostname must match the certificate subject. If one of those three tests return false then the certificate is marked as invalid. When you are just testing your application, you can make your client proxy ignore these tests and just call the service. Therefore create a class file that contains the following code:   1: using System.Net.Security; 2: using System.Security.Cryptography.X509Certificates; 3:   4: class Certificates 5: { 6: public static bool Vali

Running a 32-Bit Assembly on a 64-Bit IIS server

Last week, I was installing a web application on our 64-Bit webserver. After deployment I got following error when trying to load the website: Could not load file or assembly 'Name' or one of its dependencies. An attempt was made to load a program with an incorrect format. This error occurs when you have the following settings: IIS running on a 64-Bit Operating System The Assembly DLL in question has been compiled for 32Bit - check the project properties under the build tab, if under platform target you have x86 then it is 32-Bit only. By default a 64-Bit IIS machine is using an Application Pool that is not allowing a 32-Bit DLL to be processed. You have to enable 32-Bit support for the Application Pool yourself. Therefore open IIS Manager, find the application pool for the site and select the Advanced Settings. Notice that there is an option called " Enable 32-Bit Applications" . Enable this and you should be good to go .

TFS Power Tools 2010 available

The TFS Power Tools finally made it into a 2010 version.  Brian Harry wrote about them a couple of weeks ago: http://blogs.msdn.com/bharry/archive/2009/11/18/tfs-2010-power-tools-coming-soon.aspx . As most of the power tool features moved into the final product, there aren’t a lot of feature enhancements. Here are the links: 1. TFS MSSCCI Provider: http://visualstudiogallery.msdn.microsoft.com/en-us/f959ea32-5ac3-424a-a709-5001a158ebe8 2. TFPT: http://visualstudiogallery.msdn.microsoft.com/en-us/0e69a28f-020c-488b-80b3-f4c89a20621d

Truncate your SQL Server Transaction logs

If your SQL Server Transaction logs are exploding, you can shrink them using following commands: Check first if their are any pending transactions: 1: DBCC OPENTRAN(<TransactionLogName>) If there are no pending transactions, you can safely execute following command: 1: USE DatabaseName 2:   3: GO 4:   5: DBCC SHRINKFILE(<TransactionLogName>, 1) 6:   7: BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY 8:   9: DBCC SHRINKFILE(<TransactionLogName>, 1)

WorkItemTypeDeniedOrNotExistException

Configuring a new laptop comes with a lot of work. You have to install all the software you are used to, apply all the updates, change the configuration and so on. So after installing Visual Studio 2008, I continued with the SP1 upgrade.  But after the installation was done, I got the following error when I tried to open a work item in Team Explorer: Could not load type 'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException' from assembly 'Microsoft.TeamFoundation.WorkItemTracking.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. As the TFS administrator inside my organization, I had seen this error mentioned before, so I knew how to solve it. Running the VS2008 SP1 install for a second time will patch Team Explorer up to the required level.

Buy of your guilt

I think we all have written bad code before. And of course, we all want to rewrite this code if we could have a second chance. But most of the time, this is not possible. So you have to deal with the fact that  this bad code is still there (and hunting you down!). A horrible idea that keeps you awake at night. But from today on, you no longer have sleepless nights as you could do something simple and easy, buy of your guilt! Go to codeoffsets.com , buy bad code offsets and free your mind from this trouble. Your money will be well spend on supporting open-source projects to the greater benefit of everyone. This is not a joke!

Creating a Self Signed Certificate in IIS 7.0

In IIS 6.0, creating a self signed certificate was not available out-of-the-box.  You had to use tools like SelfSSL.exe to get the job done. In IIS 7.0 this feature is standard available and very easy to use as you can see in the Tip/Trick: Enabling SSL on IIS 7.0 Using Self-Signed Certificates blog post by Scott Guthrie.

Configuring Bindings for SSL in IIS 6.0

After configuring bindings in IIS 7.0 , I had to do the same thing in IIS 6.0. In IIS 6.0 it’s a little funkier than just clicking on the right action link. To configure this for SSL host headers in IIS 6.0 click Start , click Run , type 1: cmd   in the Open box, and then click OK . Type the following command at the command prompt: 1: cscript.exe %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set /w3svc/<site identifier>/SecureBindings ":443:<host header>" where site identifier is the unique id that every website gets in IIS(if you have only one site, it’s 1) and host header is the host header for the Web site, for example, www.microsoft.com .

Scrum for Team System Version 3 Beta 2 released

Yesterday the Scrum For Team System template Version 3 was released. This version works for Visual Studio 2010 Beta 2 and brings a lot of new features and possibilities to the Scrum template. The linked zip files contain the latest version of the Scrum for Team System process template and client side tools. http://www.scrumforteamsystem.com/dl/SfTSv3.Beta2.x86.zip http://www.scrumforteamsystem.com/dl/SfTSv3.Beta2.x64.zip I especially like the Scrum masters workbench .