question

70017057 avatar image
0 Votes"
70017057 asked 70017057 commented

Migrating solutions among VisualStudio2015s and VisualStudio2019s

Hi,

I have more than two PCs and I tried to copy Visual studio solutions from one to another.
The project is MFC app and it imports Active-X control.
It's one project in a solution, it is a single dialog-based application.

I was trying to copy/build/run a solution on a PC to another PC.
Every time when I try to run (in DEBUG mode) I found "debug assertion failure" at dlg.DoModal() of CApp.

I tried from VS2015 to VS2015.
I tried from VS2019community to VS2019community.
I tried from VS2019community to VS2019professional.
(because of this I bought a copy of VS2019professional, but i doesn't work.)
I installed VS2015 and VS2019 on PCs many times, and I am sure the setup is the same.
sometimes the directory name and structure are same among PCs.

It seems the solution doesn't work properly.
It sometimes do not show list of solution files.
Sometimes it won't show my dialog at all.

I would like to ask you the below.
1. how may i copy a whole solution to another PC. is there any secret?
2. how can i fix the problem after I copy the solution.

I appreciate your help.

please mail me the answer as well.

best regards,

vs-general
· 4
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.

Dear TianyuSun-MSFT,

Thanks for your answer.
I think your answer is for upgrading a projects between Visual studio versions.

My problem is, though, a project between SAME VERSION of visual studio.
Let me put it simple.

I developed a project in PC A with VS2019.
I copied the project to PC B with VS2019.
It does not run. It gives me the following error, as I copied ftrom dialog box.


Microsoft Visual C++ Runtime Library

Debug Assertion Failed!

Program C:\Windows\SYSTEM32\mfc140ud.dll
File: D:\agent_work\61\s\src\vctools\VC7Libs\Ship\ATLMFC\Src\MFC\occcont.cpp
Line: 925

For Information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)



  • My D drive does not have directory named agent. D:\agent is not exist at all.


I appreciate your further interest.
best regards,

0 Votes 0 ·

Which ActiveX control are you using in your application?
Is the ActiveX control present and registered on each system that you are using for your project?
Are you building for 64-bits or 32-bits?

1 Vote 1 ·

Hi @70017057 , thanks for your reply. Generally, using different versions of VS(VS 2019 Community, Professional, Enterprise) will not change something which are related to debug or build, and fail to run the same project. I doubt whether the VS 2019s which you are using have the exact same configurations. About the configurations, you can check ifthe same workloads, components were installed from VS Installer, and open Debug > Options then compare and make sure that the selected “Debugging” related options are the same.

BTW, I think the issue is related to “debug” so if you change to use “Release” to build/run, this error should not appear. But, of course, this is just one thing in my mind, not a solution or a workaround.

0 Votes 0 ·

Have you made any progress in resolving the debug assertion issue?

0 Votes 0 ·
RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered 70017057 commented

I reproduced the debug assertion for an MFC dialog-based app that uses an ActiveX control -
111524-mfcax.png

The root cause of the problem is either a completely unregistered ActiveX control or a difference between the bitness of the registered ActiveX control and the bitness of the MFC dialog-based application. Both problems trigger the debug assertion from the MFC dialog-based application.

A 64-bit version of the control must be registered for a 64-bit application and a 32-bit version of the control must be registered for use in a 32-bit application.



mfcax.png (8.9 KiB)
· 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.

Dear TianyuSun-MSFT and RLWA32-6335

I really appreciate your kind and insightful replies.
YES, it's 32bit ActiveX and 64bit compiled.

The ActiveX is in 32bit and
the project default was 64bit, whenever I changed PCs.

I guess the VisualStudio solution/project does not carry 32bit/64bit configuration.
Thanks both of you!!!

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

Hi @70017057 ,

Welcome to Microsoft Q&A forum.

Generally, Visual Studio is backwards compatibility with previous versions, but support for some project types changes over time, newer version of VS might not support certain project at all, or it might require that you update a project so that it’s no longer backwards-compatible.

Actually migrating project is simple but is also complex, it depends on the specific project.

Simple -> Open the project which is developed with VS 2015 in VS 2019, and VS 2019 will successfully open it and you can continue to develop.

Complex -> Sometimes, some used libraries/files/configurations are changed/not supported in the newer version of VS and this may cause errors.

Of course, there are some ways to avoid some errors during the migrating, you can refer to this document: Upgrade C++ projects from earlier versions of Visual Studio, and this document: Microsoft C++ porting and upgrading guide. But if other errors appear, you need to solve them one by one by analyzing the error message and similar issues.

I’m not sure whether this error which you mentioned is related to your codes/project, did your project build and run well in VS 2015 or in the original(first used) VS XXXX you used?

Besides, perhaps this document: Porting Guide: MFC Scribble may help.

Best Regards,
Tianyu


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.

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.