Category Archives: Visual Studio

Visual Studio is not updating my NuGet Packages – what to

You have projects relying on NuGet packages.  Some of these NuGet packages have been updated and you know this.  However, for one reason or another, perhaps the NuGet packages do not increment their version for each new release, Visual Studio does not observe the packages have changed and, therefore does not update them.  What do you do?

Quick and dirty solution is to just delete these respective NuGet packages from these two places and then build your solution again.

  • Local NuGet repository: on my Windows 8 machine it is found here:   C:\Users\my-username\.nuget\packages
  • Local NuGet cache for the packages in this solution.  This folder is typically found in the root of the solution.

Do this and you are good to go.

Happy Coding.



Visual Studio unable to load a program with an incorrect format.

Verify the bitness of the hosting application when you encounter this error.

Visual Studio 2013, for example, runs as a 32 bit process.  IIS Express also executes as a 32 bit process.  However, I just learned that a Windows Forms application being debugged in Visual Studio  2013 executes as 64 bit process.

A quick way to confirm the correct bitness is to identify the process under the task manager.  A 32 bit process will be appended with a *32.  Visual Studio for example is represented as devenv.exe *32.  However, the  Windows Forms application that was being debugged was represented as ApiTestClient.vshost.exe.

In our case, we had copied the 32 bit version of an unmanaged dependency from the bin folder of an ASP.NET classic application into the bin folder of the Windows Form application.  This was the problem.  We needed to use the 64 bit version of this dll worked instead.

Visual Studio Community Edition – thank you Microsoft

Thank you Microsoft for providing us with a community edition, yet full fledged version of Visual Studio. This initiative levels the playing field in terms of cost of entry for development in the .NET ecosystems. With the best IDE on the planet in Visual Studio now free, coupled with a well though out language such as C# and a robust code execution environment backed by the CLR, it remains up to us to imagine the kinds of industrial problems to solve.

Thanks again Microsoft, Satya Nadella and all those who came together to make this happen.

JavaScript runtime error: Unable to get property of undefined or null reference.

I randomly get this error when using TypeScript in ASP.NET MVC5 application.

Unhandled exception at line 15, column 5 in http://localhost:2425/theapp/Scripts/app.js?51
0x800a138f - JavaScript runtime error: Unable to get property 'prototype' of undefined or null reference

This is over the following automatically generated JavaScript:

var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();

This is a typical application calling main App.js in _Layout.cshtml as follows:

   <script src="@Url.Content("~/Scripts/app.js?51")"></script>

Turns out that if I manually increment the number after app.js the problem magically disappears. Why? I cannot say at this time…