Default Enum initialisation by MS Create Unit Tests wizard.

VS 2012 doesn’t show Create Unit Tests wizard. However it can be used – see

Where is the “Create Unit Tests” selection?  and

 
I’ve found the Wizard creates quite funny default for enumerator- to use constructor.
 
PaymentType paymentType = new PaymentType (); // TODO: Initialize to an appropriate value
 
I would prefer to have first/default enum value, e.g. 
 
PaymentType paymentType =PaymentType.None ;
 
I should suggest it to ALM Rangers, who started a new test generation project.
Another funny default is for numeric primitives:

 Decimal totalAmount = new Decimal(); // TODO: Initialize to an appropriate value

 

WCF Transactions are not supported by Azure.

We have a service operation, for which it is very important to ensure that a client receives the status, that was determined at the end of operation.
If client does receive the response, the server status should be “completed”. Otherwise (in case of communication error), server status should be rollback and stay as “pending”. The possible technical solutions were discussed and WCF Transactions support with  2PC(two phase commit) was selected.  We implemented service operation with transaction commit/rollback support and asked our clients to use it.
Our main client is running on Azure. It was a big disappointment, when Readify consultant Himanshu Desai  adviced that WCF Transactions are not supported by Azure.
I did a quick check on Internet and didn’t find that is well known issue.
Below are a few quotes to describe the limitation:

2PC in the cloud is hard for  all sorts of reasons. 2PC as implemented by DTC effectively depends on the coordinator and its log and connectivity to the coordinator to be very highly available. It also depends on all parties cooperating on a positive outcome in an expedient fashion. To that end, you need to run DTC in a failover cluster, because it’s the Achilles heel of the whole system and any transaction depends on DTC clearing it.

The bottom line is that Service Bus, specifically with its de-duplication features for sending and with its reliable delivery support using Peek-Lock (which we didn’t discuss in the thread, but see here and also here) is a great tool to compensate for the lack of coordinator support in the cloud

The Azure storage folks implement their clusters in a very particular way to provide highly-scalable, highly-available, and strongly consistent storage – and they are using a quorum based protocol (Paxos) rather than classic atomic TX protocol to reach consensus. 

In the current release, only one top level messaging entity, such as a queue or topic can participate in a transaction, and the transaction cannot include any other transaction resource managers, making transactions spanning a messaging entity and a database not possible.

Has Windows Azure any kind of distributed transaction mechanism in order to include any remote object creation in an atomic transaction including other domain-specific operations?  
The alternative solution suggested by Himanshu Desai is to have an operation to start a process on the server and then poll in a loop on a client until final status is received from the server. 

 

2010 version of TF (TFS command tool) unable to determine the workspace that is working with Vs 2012 and TFS 2012

We upgraded to VS 2012 and TFS 2012 a month ago.
I have a backupShelve.cmd that used to work before upgrade, but when I run it yesterday caused the error
Unable to determine the workspace. You may be able to correct this by running ‘tf workspaces /collection:TeamProjectCollectionUrl’
 
The backupShelve.cmd file is the following 
call “C:Program Files (x86)Microsoft Visual Studio 10.0VCvcvarsall.bat” x86
tf shelve   /replace /comment:”Current backup” CurrentBackupMT01 /noprompt
pause
After some time I’ve noticed, that batch file refers to version 10 folder instead of “Microsoft Visual Studio 11”.
After I’ve changed folder name, TF started to work.