Search This Blog

February 26, 2014

Fixed the issue: Visual Studio 2012 IDE shows the error – Object reference not set to an instance of an object.

I have Visual Studio 2013 IDE and Visual Studio 2012 IDE installed in my work laptop.

Today when I used Visual Studio 2012 IDE to open one solution file, for some reason, all files were not showing up in Solution Explorer. I used File-Open ->Project/Solution to open the solution file, it showed the error- Object reference not set to an instance of an object.


What happened with Visual Studio 2012?  It must be one line code in Visual Studio 2012 that can’t handle very well and throw the error.  Visual Studio 2013 is working fine.

After looking into this issue, after I deleted all files in the following folder, opening solution file has no issue at all.

%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\11.0

February 21, 2014

Fixed the issue: LOAD TEST menu doesn’t appear in Visual Studio 2013

Today I opened one solution file via Visual Studio 2013 and noticed one interesting issue: LOAD TEST Menu doesn't appear in Visual Studio 2013, but it appears in another solution file.

After looking into this issue , I found out the difference between these 2 .csproj files.


Just add this missing  WebTest Project Type in the solution file, reopen it, and LOAD TEST menu appears again.


February 13, 2014

Fixed the issue: Some tests failed in TFS 2013 build due to the Error Code: 502 Proxy Error: The ISA Server denied the specified Uniform Resource Locator

We just upgraded from TFS 2010 to TFS 2013, but we still use the same Build Agent. One interesting part was that after I pushed a new build, some tests failed in TFS build and here was the error message.

Error Code: 502 Proxy Error: The ISA Server denied the specified Uniform Resource Locator


I was not aware of this IP address and this server. After I logged to the Build Agent and used mstest to run one test again, the test still failed. After looking into this issue for a while, here are the steps to fix the build issue.

Open IE and go to Tools > Internet Options > Connections > LAN Settings > Proxy Server > Advanced > Exceptions 

Add IP address and domain name (i.e 10.2.1.5; xxx.domain.com) and apply the changes.


Run the test again or queue a new build. The tests pass in TFS 2013 build.

February 12, 2014

Fixed the issue : The C# Project is targeting .NET Framework, version=v4.5, which is not installed on this machine.

Today I logged in to Windows Server 2008 R2 and downloaded the latest code from TFS 2013. When opening the solution file, I saw the following screenshot error.

Change the target to .NET framework 4.5. You can change back to .NET Framework , version =v4.5 at a later time.


 After looking into this issue, here are my findings:

Another team member is using .NET framework 4.5.1 on his laptop via Visual Studio 2012.

When opening the solution file, for some reason, there is no .NET framework 4.5 for this project in the dropdown on this machine. That explained why I saw this error.


 Forgot that screenshot error,  moved on and used . NET framework 4.5.1 to build the project. It worked perfectly.

February 10, 2014

Turn off unimportant object types when doing database comparison in Visual Studio 2013

When using Visual Studio 2013 to do database comparison between 2 environments (DEV & TEST), I only care about the following things :

1.    Table names are identical.

2.    Table Column names are identical.

3.    Stored Procedures are identical.

However, when using Visual Studio 2013, I can still see something unimportant like users, index and other unrelated object types.  That’s because Visual Studio 2013 turns on these Object Types by default.


Just select Stored Procedures & Tables only and do database comparison again. That’s the information I really want to see.



Please see also:

SQL Server : Database Schema Comparison Tool for Different Environments

February 7, 2014

How to disable CodeLens in Visual Studio 2013?

If you use Visual Studio 2013 and you don’t like CodeLens in your source code, you can disable it easily. 



Here are the following steps:

Go to TOOLS-Options


Text Editor- All Languages-CodeLens- Uncheck Enable CodeLens and you are all set.


February 6, 2014

The bug charts in TFS 2013 dashboard don't work on IE8

Our company is still using IE 8 in all projects. After our team upgraded from TFS 2010 to TFS 2013, the TFS 2013 dashboard is looking good.

However, one interesting part is that when I click the Charts on IE8, it shows the following error:

TF401209: The chart requires capabilities which are unsupported on the current web browser


When I use Chrome, it is working perfectly.

I don’t feel surprised to see this error because it makes me remember when I installed VS 2013 Preview version, IE 10 was required, but finally it is not required for VS2013 RTM.

In the meantime, in order to fully use TFS 2013 dashboard, forget about IE8 and use Chrome if your company is still using IE8.

February 5, 2014

Fix the issue: Chinese data cannot be displayed well in SQL Server 2008 R2

Today, when I used SQL Server Management Studio to connect to SQL Server 2008 R2, I noticed that Chinese Characters in one table column could not be displayed correctly on my Windows 7 machine.  It showed Garbled Characters.  I added Collation in SQL Query and it didn’t work either. 


After looking into this interesting issue, I noticed that for some reason, language packs were not installed.  After installing Chinese language packs successfully and rebooting the machine, the Chinese data is displayed well in SQL Server 2008 R2.