First of all thanks for your response.
Yes, of course, but the problem begin when I modify anything in the MX project.
My goal is to use I2C, then I assign PA15/PB15 to I2C2 and save the *.ioc file, after that CubeMX start to re-make all the project modifying a lot of files and later I give a lot of errors at compiling time.
I can resolve all these errors manualy correcting each of them but if I want to modify anything al hardware level with CubeMX I start the same operation I described.
I’m using STM32CubeIDE Version: 1.5.1
Did you changed the *.ioc project and recompile without errors?