Search This Blog

January 23, 2013

Visual Studio 2012- Disable All Caps Menu


If you open Visual Studio 2012, you can see all-caps interface.  Do you like it?  If you don’t like it, you can disable it in registry key. 

Go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General\

Add a DWORD (32-bit ) value ( in my Windows Server 2008 R2 X64)





Enter SuppressUppercaseConversion and Enter 1





Open Visual Studio 2012 and all-caps menu is disabled.


January 7, 2013

TFS 2010 Continuous Integration Build: One check-in will trigger multiple builds.


In TFS 2010 Build Definition, if I use Continuous Integration build and the source controls folder points to TEST Project in 3 different build definitions (DEV, TEST, and Stage), every time after I make some changes in my TEST Project and check in the code, don’t feel surprised that 3 builds will be triggered automatically.




January 4, 2013

Good Strategy: Set up Multiple TFS Build Definitions for Multiple Environments


In order to fully use TFS Build Automation for our multiple environments, currently we set up 3 TFS Build Dentitions as follows.  


Branch & Environment
TFS Build Definition

DEV
Source Control Folder points to DEV Project in DEV environment
(Web.config and service reference points to DEV)

TEST
Source Control Folder points to DEV Project in TEST environment
(Web.config and service reference points to TEST)

STAGE
Source Control Folder points to DEV Project in STAGE environment
(Web.config and service reference points to STAGE)

PROD
We don’t set up definition in PROD because it is not allowed for us to do so.




In order to implement Unit Tests, WCF Tests, DB Tests and Coded Web Tests in TFS build definitions above, I need to create a TEST project that adds 3 different addresses (URLs) in service reference for multiple environments. I also need to add 3 Test lists called BVTDEV, BVTTEST and BVTSTAGE in Test List Editor and put required tests inside them separately.






Therefore, one TEST Project with different Test List is always available for all environments.

Branch & Environment
TFS build Definition

DEV
Source Control Folder points to DEV Project in DEV environment
Source Control Folder points to TEST Project in DEV environment
 (Test List to run: select BVTDEV)

TEST
Source Control Folder points to DEV Project in TEST environment
Source Control Folder points to TEST Project in TEST environment
(Test List to run: select BVTTEST)

STAGE
Source Control Folder points to DEV Project in STAGE environment
Source Control Folder points to TEST Project in STAGE environment
(Test List to run: select BVTSTAGE)

PROD
We don’t set up definition in PROD because it is not allowed for us to do so.


From our previous experience, when we push the code from DEV to TEST or from TEST to STAGE environment, DB changes always cause the issue and those BVTs can help us quickly capture if it is a good build or not.

I know some people would like to use 1 build definition for multiple environments. I don’t recommend it because different environment has different configuration and different service reference address. For TFS reporting, we can also know the build quality status for DEV /TEST / STAGE.

Setting up multiple TFS build definitions for multiple environments is a wonderful strategy for our current Silverlight 5 Project.

TFS 2010 Clone Build Definition


Last year I set up many TFS build dentitions for different environments (DEV, TEST and STAGE). When setting up different build dentition, I found TFS 2010 doesn't natively provide the feature of Clone Build Definition and it was really time consuming to set them up individually.

On Nov 26, 2012, I wrote a post entitled Fix the issue of Internal Error in Changeset in TFS 2010 . After installing TFS powerful tools 2011, the feature of Clone Build Definition appears in TFS 2010.



It is good news for me because I can clone many build definitions I want.


January 3, 2013

Silverlight does not support GIF images

Recently our tester tested one scenario in Silverlight 5: after uploading JPG, PNG, BMP or GIF file, the GIF/ BMP image didn’t appear in Silverlight 5 Application. Therefore, she logged the bug.

I told her that Silverlight does not natively support GIF image.  Our developer would like to fix the bug for displaying BMP image in Silverlight 5.

January 2, 2013

Don’t copy last name with Apostrophe from MS word 2010 to SQL Server 2008 R2


Today I use the following SQL command to see how many users have Apostrophe in the last name column. However, it only returns 1 row. I feel so surprised.

SELECT *
FROM from Table
where last_NM like '%''%'

After investigation, I notice one user’s last name has the special Apostrophe and that’s why the data is never returned.

This makes me think that someone used MS word 2010 , entered his last name and made a copy/paste to SQL Server 2008 R2.




Do you see the difference about Apostrophe ? The first one and the third one have the same Apostrophe .


If I use the following SQL query with special Apostrophe, the data is returned.

SELECT *
FROM from Table
where last_NM like '%’%'

Windows 8 Microsoft Account: The login screen always shows Other User after the reboot


I got my HP Windows 8 (Consumer) laptop recently and I used Microsoft account to set up this machine for my wife. “Microsoft account" is the new name for what used to be called a "Windows LiveID."

I also applied latest Windows 8 update.  After that, I added a user via my Microsoft account with admin right. I could not believe my wife and I  got truncatedusername_000 in the user profile as follows: 





After 1 day, my wife didn’t like Windows 8 and said she will not use it any more. Therefore,  I deleted her account.


I added a new language (Chinese Traditional), changed system locale to Chinese and it caused the reboot. After that, I could not believe I saw the other user login screen. When I clicked ok, it showed the login name – my wife Microsoft account (sun42_000), which was deleted already.



I also noticed: After I changed the system locale back to the US and still used my account in Windows 8, the latest Windows update caused the reboot and the login screen still showed the deleted Microsoft account (sun42_000)

This is a very basic scenario (BVT). I can’t believe Microsoft Windows Team shipped Windows 8 to customers. 



December 31, 2012

TFS 2010 Build Number Format


In TFS 2010, Build Number Format in Build Definition uses date format by default. For example, here is the Build Number Format.

$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)

TestBuild_20121231.1

TestBuild_20121231.2

TestBuild_20121231.3
....

The build number is incremental on Dec 31, 2012

If our project would like to use Major release 2 and Minor Release 1, the following build number format can be used easily.

$(BuildDefinitionName)_2.1.0$(Rev:.r)

ProjectName_2.1.0.1

Projectname_2.1.0.2

Projectname_2.1.0.3

…

Can we put the following Build Number format? The answer is no because the following screenshot will appear.

$(BuildDefinitionName)_2.1.$(Rev:.r).182.



You can modify the Build Process Template (xaml) to meet your need of Build Number format as well.

December 30, 2012

Date format localization causes the Issue on ArcGIS Rest API


Our project is using Silverlight 5 and ArcGIS Rest API. We are very happy that the product is live in 7 countries now.

Recently our users in some EMEA countries reported the issue saying that they can’t use some important features in their local machines.  This makes me think that it is the localization issue.  Developers always use English Operating system and IE (en-US) to develop the important features. Of course, there is no issue in their local machines. Testers can’t find those localization issues, either. We need to narrow down the issue and see if we can still repro them. 

It makes me think of some scenarios:

IE French (fr-FR): causes the issue when testing

IE Germany (de-DE):  no issue when testing





Change system Locale to French or Germany and use IE (en-US): No issue when testing.




Change date format to French and use IE (en-US): causes the issue when testing.

Change date format to German and use IE (en-US):  causes the issue when testing.

Change date format to Chinese (PRC) and use IE (en-US): causes the issue when testing in another feature.




Since our product is live in 7 countries, we need to narrow down the issue and finally we find date format in localization causes the issue all the time for some important features. It is easy for our developers to fix the bugs quickly.

We also notice that ArcGIS Rest API can’t handle localization of date format in some EMEA countries very well. In this case, it is out of our control. We need to report the bugs to ESRI.

The quick workaround is to ask users to change the date format to English (United States), it will work.

December 28, 2012

Successfully upgrade Windows 8 to Windows 7 on HP Pavilion G7-2240US and fix the issue of Windows cannot be installed on this disk. The selected disk is of the GPT partition style

My wife got the new HP Windows 8 laptop (HP Pavilion G7-2240US) last week. After she played around it, she didn't like Windows 8 because there was no productivity in her daily job tasks. I totally agreed. 

I don't understand why Microsoft removes the function of disabling Metro UI in Windows 8 RTM, but it was allowed in Windows Developer Preview Version. I have no complaints about Windows RTM in Tablets or Surface Computers. I do have complaints about there is no Windows 8 desktop version for laptop like Windows 7.

She wanted me to "upgrade" Windows 8 (Consumer version) to Windows 7 in this new HP laptop. Here are my steps:

Use F10 key to go to BIOS setup. It has the function called Legacy support. We need to enable it and it can let us install Windows 7.  EFI BIOS will be disabled automatically.

Use Internal CD ROM to boot Windows 7 CD

When installing Windows 7 x64, the setup screen told me to install Windows 7 in a new partition disk. However, I got the error dialog box saying Windows cannot be installed on this disk. The selected disk is of the GPT partition style.

Don’t panic.  Use Shift + F10 and it goes to command prompt.

Enter the following command

diskpart

List disk

Select disk 1

Select partition 1

Clean

Convert mbr :

If I didn’t use clean command, I could not convert GPT to MBR successfully.

After using clean command, I converted GPT to MBR successfully. After rebooting the machine, I installed Windows 7 without any issue.

If you don’t like Windows 8 on your new laptop, you can try to "upgrade" it to Windows 7 and meet your needs.