Libtorch build does not work in MFC environment

I took the model from the console to the Libtorch and tested it using VS2015.

However, in the MFC environment, the inclusion of “torch\script” in the header results in an error.

I tested it in the console environment again for comparison, but I found it working properly on the console.

Is Libtorch not available in MFC environments?

I have the same problem, I need to use PyTorch C++ API in an existing MFC application. No problem in a console application, but somehow MFC seems to be incompatible with the PyTorch C++ API.
Did you manage to solve the problem? Any idea?
Many thanks and kind regards,