The given value of type String from the data source cannot be converted to type nvarchar of the specified target column.

Today I experienced this problem while importing models from the build machine into one of the developer machines:

The given value of type String from the data source cannot be converted to type nvarchar of the specified target column.

A quick search on the internet took me to this blog post that explains the importance of initializing / updating your model store after installing CU’s.┬áTo initialize/update your model store you simply have to run the AxUtil with the schema command. (Alternative for powershell is Initialize-AXModelStore)

For a full list of AXUtil and PowerShell commands, please refer to MSDN.