Visual Studio error on build: The function “CurrentUICulture” on type “System.Globalization.CultureInfo” has not been enabled for execution

If you are using the Visual Studio plug-in with Visual Studio 2012, and you attempt to build a JNBridgePro project, or you attempt to reference it from another project, you see a Visual Studio error:

The function “CurrentUICulture” on type “System.Globalization.CultureInfo” has not been enabled for execution.

This can happen if, in addition to VS 2012, you have also installed later Visual Studio versions, along with their associated .NET frameworks. It is caused by a version mismatch between the version of MS Build being used, and the current installed version of the .NET Framework.

The simplest way to remedy this problem is to exit Visual Studio, then open a command-line window, enter the following line, and hit return:

setx MSBUILDENABLEALLPROPERTYFUNCTIONS 1

Once the command succeeds, you can close the command-line window.

Now, relaunch your project in Visual Studio. You should no longer see the problem. The fix will persist even after you log out and log back in, or the machine is rebooted.

The problem does not appear to occur in Visual Studio 2013 or 2015.