tow version different of OpenCV

Hello, How I can use tow version different of OpenCV in the same Visual Studio 2010 project? thank

that seems to be a very bad idea, please explain, why you think, you need that

I have a project using VS2010, and I used Open CV 2.5, on the other hand, I am developing a new algorithm, and I need opencv 4.5, but without removing opencv2. 5 in the project because I can’t change all in my project code

you could try to split it into 2 projects, put the legacy code into a dll
(and link only that to older opencv),
and your current algo into main