My guess is that "Mot" is contained in a separate DLL than the application and that your Release configuration is either not set to Deploy that assembly when you run or it is set to deploy it to a directory other than where the EXE is getting deployed.
To remedy the first, open the Configuration Manager (it's in the dropdown that says "Any CPU") and check "Deploy" next to the assembly that holds the "Mot" namespace.
To remedy the second, open the Project Properties on both applications, navigate to the "Devices" tab and make sure that the "Output File Folder" matches for each. This is a good idea in any case to prevent Studio from deploying multiple copies of the assemblies.