title: building with Visual Studio 2019 but getting depend on MFC140U.dll
body: <p>I have moved from VS2015 to VS2019. I've created a deployment and all is good locally, here on three machines. But when I shipped a test MSI out to an old laptop we got an MFC140.dll not found.  I found the dependency in one of my dlls, thought it had something to do with not moving it up to UNICODE. Did that and it still depends on MFC140U.dll</p>
  
  <p>I do have</p>
  
  <pre><code>toolset       (VS 2019)vs142
  SDK Version   10.0(latest installed)
  </code></pre>
  
  <p>I've googled and pulled hair out. But the lights are not coming on. Checked, and this is also happening to a second dll I build.</p>
  
  <p>So I check another app that goes into the deployment. It does not use any of my dlls. Yet it also depends on MFC140U.dll as well as MFC142U.dll. The only libs linked in this one are BOOST and SQLITE3. And those don't have any MFC dependencies. This just adds to my confusion.</p>
  
  <p>The only thing that would make sense to me is that a vs142 build has some 140 dependency and the deployment system is not picking that up. Note that deployment is not done with install shield as was done with vs2015.</p>
  
  <p>Yes, I could fix it by shipping the MFC140U.dll but that just does not seem right. Either I, or Microsoft, has something wrong is all I can figure.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I created a fresh MFC project with VS2019 and looked at the depends. Same thing, this is about Microsoft. And it looks like the deployment system includes MFC142x dlls but not the MFC140 that is required.</p>