Solved my issue. Check the build configuration, if you use torchlib in release, build the project also in release.