Pages

Saturday, July 15, 2017

"StrongTypingException: The value for column IsPrimaryKey in table TableDetails is DBNull" Entity Framework 5 and MySql Server 5.7.9

"StrongTypingException: The value for column IsPrimaryKey in table TableDetails is DBNull"

For future reference on this particular issue with Entity Framework 5 and MySql Server 5.7.9. It has been reported as a Bug. Below is the work around reported at Stackoverflow.

The work around solves the issue.

I have included this fix, so when the bug has been corrected, I can revert back from this work around.

Work Around
**Use MySql Command Line Client. Will not work within Workbench.
use <database>
set @@optimizer_switch='derived_merge=off';
SELECT @@optimizer_switch\G
At MySql website gives explanation.

This post is for the purpose of my notes only and sometimes a rant.

“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”
Henry Ford


Friday, July 14, 2017

Visual Studio 2013 - Logging in as different user.

When Visual Studio informs you that someone is already logged in and you are unable to login under a different user, I found this solution solved this problem that I was experiencing.


There is a comment about this under this answer, but I think it's important to list it here. If you want to preserve your settings, export them first because they will be lost.

Preserve Visual Studio 2013 Settings:
  • Tools > Import and Export Settings...
  • Select Export selected environment settings.
  • Check ALL settings check box.
  • Enter backup filename and file's directory.
  • Click Finish
From MSDN forums - since I had to hunt around far too much to find the solution to this:
  1. Close Visual Studio
  2. Start the Developer Command prompt installed with Visual Studio as an administrator.
  3. type 'devenv /resetuserdata' ('wdexpress /resetuserdata' for Express SKUs)
  4. Start Visual Studio Normally.
Do not remember where I found this solution, but I know that I had Googlized for the solution and almost sure that I landed at Stackoverflow.

This post is for the purpose of my notes only and sometimes a rant.

“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”
Henry Ford

The Compatibility Checker Package package did not load correctly

Visual Studio 2013 - Receiving Error: The Compatibility Checker Package package did not load correctly.

Googlizing: found at Stackoverflow a solution solving the problem:

I attempted:
  • Deleted ComponentModelCache folder, which is located at:
    %localappdata%\Microsoft\VisualStudio\12.0\ComponentModelCache
  • Deleted Extensions folder, which is located at:
    %localappdata%\Microsoft\VisualStudio\12.0\Extensions
  1. Closed Visual Studio 2013
  2. Deleted both folders mentioned above.
  3. Restarted VS
*These attempts did not correct the problem, so I followed another suggestion.
  1. Closed VS
  2. Opened, as Administrator, the Developer Command Prompt for VS2013 located at:
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
  3. At command line typed: devenv /setup.
  4. After typing in devenv /setup and hitting enter, the cursor moved down one line and blinked for about 30-45 seconds before returning back to a command prompt.
  5. Closing out Developer Command Prompt, VS was opened.
Everything is back to normal. No errors.

I remember having a similar issue a while back. At that time all I had to do was delete the ComponentModelCache folder.

This time I had to take an extra step running devenv /setup at the command prompt.

A resourceful link:
/Setup (devenv.exe)

This post is for the purpose of my notes only and sometimes a rant.

“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”
Henry Ford