question

WlodekDoniec-1518 avatar image
0 Votes"
WlodekDoniec-1518 asked RLWA32-6355 commented

vs2019professional, remote debugger, redistributable

On my development PC is vs2019 professional installed. I develop in C++ application for remote pc (nativ c++).
If I install RemoteDebugger (RemoteTools) on remote PC and start msvcmon, and try to start my application on remote, get a lot of errors with missing dlls.

I installled actual framework(vc_redist.x64), Win SDK(22000.194.210911-1543.co_release_svc_prod1_WindowsSDK) and RemoteTools(VS_REmoteTools x64).

Always same problem.

Asap I install VS2019 on remote PC
1.MSVC142,
2.Windows10SDK,
3.Just In Time Debugger)

all works fine.

But for this installation need license or community edition.

Is there other way to get the goal with redistributable modules?
(on VS2010 it was not a problem).

Thx in advance.

c++vs-generalvs-debugging
· 1
5 |1600 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.

Which DLLs are missing?

0 Votes 0 ·
RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered RLWA32-6355 edited

If you are using a debug version of your application on the target system then installing vc_redist.x64 on the target will not help you since it does not install the debug versions. You need to copy for test purposes the debug versions of the dlls from your development system to the target system. On my VS2019 Community the debug versions of dlls can be found at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.29.30133\debug_nonredist. You will probably need to copy the debug version of the UCRT also.

5 |1600 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.

WlodekDoniec-1518 avatar image
0 Votes"
WlodekDoniec-1518 answered

Now I uninstalled Vs2019 from remote, but remotedebug still worx.
****140d Dlls are in system32 folder still present. Probably not removed by uninstall.

I've alredy tried to copy dll's by hand from my local PC to remote (before install vs2019 on remote PC).
All debug dll's like: mfc140d.dll, msvcp140d.dll,... and so on. Also vcruntime140d.dll and UCRT.

But by try to start application via remote, get error:
Application can't be started correctly.
(probably dlls and win10 version doesn't match (?)).

Must try the same on virgin PC again.

5 |1600 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.

WlodekDoniec-1518 avatar image
0 Votes"
WlodekDoniec-1518 answered RLWA32-6355 commented

To copy missing DLLs into folder is not enought.
Get still message;
App could not be started correctly ( 0xc000007b).

Only one thing helps: VS2019 installation.
But can't belive that for remotedebugging VS installation on remote system necessary.

· 1
5 |1600 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.

I created a 64-bit MFC Application using VS2019 and followed the instructions at https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging-cpp?view=vs-2019 to remote debug the application on a different system. The only thing I installed on the remote system was the VS2019 remote debugging tools. The VS2019 debugger launched and debugged the application remotely without issue.

Following shows the contents of the folder on the remote system to which VS2019 deployed the application to be debugged and its dependent dlls.

182062-remote-deployment.png


0 Votes 0 ·
remote-deployment.png (160.9 KiB)
WlodekDoniec-1518 avatar image
0 Votes"
WlodekDoniec-1518 answered

It is different behaviour to my system. Also if I copy all dlls into my working path, I'm not able to start application (0xc0000007b) error.
But it happens also if I start application on remote system directly (not by remote debugger).
Application generated on local pc is not running on remote pc.
Lost 6 hours today trying different configurations.
Compared dlls which has been changed by VS2019 in system32, but no really progress :-(

Can be problem with my application (it is moved from VS2010 to 2019).
Maybe shell try with other very simple app.

Asap I install vs2019 on remote, no problems any more.

5 |1600 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.

WlodekDoniec-1518 avatar image
0 Votes"
WlodekDoniec-1518 answered RLWA32-6355 commented

Crazy!!! Problem solved.

Trick is, missing Dlls has to be copied from Windows\SysWow64, not from Windows\System32.
In both folder are included MFC Dlls (mfc140d.dll,... and so on) as 32 and 64 bit version.
Even if my application is 32 bit, I need 64 bit Dlls.





· 1
5 |1600 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.

Trick is, missing Dlls has to be copied from Windows\SysWow64, not from Windows\System32.
.........
Even if my application is 32 bit, I need 64 bit Dlls.

From the above comments it appears that you were actually copying the 64-bit versions of the dlls which are in System32. That would explain the initial problem. Your 32-bit application needed the 32-bit dlls which are found in SysWOW64. WOW64 is the 32-bit emulation support for 64-bit windows.





0 Votes 0 ·