question

Wami007-9389 avatar image
0 Votes"
Wami007-9389 asked ·

C++/CLI Export .exe Project with Correct Setting

  Hello All...

I created some simple C++/CLI project in Visual Studio 2019 and i wanna export it as portable .exe like "Rufus". Previously i tried copy program from debug folder to run .exe on another pc. Which it has VC redisturable package and .Net 4.6.1. But it gave me error like "ucrtbased.dll" and after supply this dll then "0x000007b". I thought it need SDK package and some .dll files to debug program :(

  So, how can i export my Visual Studio project with all necessary files to run any Windows machine ( Redisturable and .Net supplied ) 

dotnet-csharpvs-generalc++dotnet-standarddotnet-runtime-framework
· 6
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The debug DLLs aren't redistributable. Have you tried with a release build of your project?

1 Vote 1 ·
Wami007-9389 avatar image Wami007-9389 DavidLowndes-6766 ·

What can i do ?
Just change configuration to release and Rebuild app or Rebuilt Solution or Just Debug?

0 Votes 0 ·
Wami007-9389 avatar image Wami007-9389 DavidLowndes-6766 ·

I tried Release mode but ucrtbased.dll error still won't fix :(

0 Votes 0 ·

If you've got a problem with ucrtbased.dll you've still got a debug build, the release one is named ucrtbase.dll.

0 Votes 0 ·
Show more comments
Wami007-9389 avatar image
0 Votes"
Wami007-9389 answered ·

72584-basl%C4%B1qs%C4%B1z2346.png72585-basl%C4%B1qs%C4%B1z12.png72586-123.png



If AnyOne Get "UcrtBased.dll" or "140D.dll" Just Do it and Click to " Built Solution" . It Will Fix Problem


baslıqsız2346.png (60.6 KiB)
baslıqsız12.png (69.5 KiB)
123.png (31.5 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DylanZhu-MSFT avatar image
0 Votes"
DylanZhu-MSFT answered ·

Hi there,
You can try to to use this tool to build all dlls into one executable file: ILMerge

Best Regards,
Dylan


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 3 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

 Thanks, very helpful but this is not correct answer for to fix " ucrtbased.dll " error :( .
 If you want try to make simple c++/cli project and run it another PC which is not installed Visual Studio .
0 Votes 0 ·

Hi @Wami007-9389 , you can try to follow below steps to configure your project:

  1. Go to Project Properties/Configuration Properties > C/C++ > Code Generation, then modify Runtime Library to MT or MTD
    72249-image.png

  2. Switch Debug to Release mode

0 Votes 0 ·
image.png (21.9 KiB)

Thank you too, man ^_^

0 Votes 0 ·
Wami007-9389 avatar image
0 Votes"
Wami007-9389 answered ·

Need Help.. Please help me :(

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.