-1

I have a client that is running a Windows 7 machine and I want to him build an .exe that he can run on his computer. However, since I am running Windows 10, I am building everything in Visual Studio 2017. The program I am making is a Winforms CLR C++ program. I put in the Windows 7 WINVER define in one of the C++ files:

#define WINVER 0x0601

The compile the project with the following properties: VSProjConfig

I send him an .exe file but when he opens it up, it gives him a an error saying that he is missing the ucrtbased.dll. I verified that he has the correct .NET framework installed on his computer:

netFramework

What could be the cause of this?

Alex C
  • 217
  • 2
  • 11
  • 2
    The runtime DLL(s) with filename(s) ending in `d` are usually the debug versions. Did you give your client a debug build? If so these DLL(s) cannot be re-distributed; you should give your client a release build. – Richard Critten Dec 13 '17 at 16:41
  • Does the client have the Visual C++ 2017 redistributables installed? – Wai Ha Lee Dec 13 '17 at 16:43
  • Possible duplicate of [Why Visual Studio 2015 can't run exe file (ucrtbased.dll)?](https://stackoverflow.com/questions/33743493/why-visual-studio-2015-cant-run-exe-file-ucrtbased-dll) – Wai Ha Lee Dec 13 '17 at 16:45
  • Actually you are right, I did send him a debug build, I'll try sending him a release build. – Alex C Dec 13 '17 at 16:49

1 Answers1

0

Build and send him a release copy. He will still need the appropriate windows libraries.

ucrtbase (Universal C Runtime) is the replacement for the msvc* runtime dlls.

To get the correct runtime, see https://www.microsoft.com/en-us/download/details.aspx?id=48234 and also possibly https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows if you have problems.

Tzalumen
  • 652
  • 3
  • 16
  • It's a debug DLL and cannot be redistributed. – Richard Critten Dec 13 '17 at 17:46
  • That's not the only problem. I have updated my answer. – Tzalumen Dec 13 '17 at 18:35
  • There aren't any options to add have a target older than 8.1. https://i.stack.imgur.com/dyXOy.png I think I also saw somewhere that targeting 8.1 would also work on Windows 7? – Alex C Dec 13 '17 at 19:15
  • When I do the 'repair' option on VS2017 installer, it gives me the following options: https://i.stack.imgur.com/unBQG.png – Alex C Dec 13 '17 at 21:49
  • Hmm, upon hammering at google for a bit [I have determined](https://learn.microsoft.com/en-us/cpp/ide/general-property-page-project) that the Windows 8.1 SDK is also the target for Windows 7 development. I was mistaken on that account. I will correct my answer. So... just get him the release version and the runtime and you should be set. – Tzalumen Dec 13 '17 at 22:50