Redirect nvcc build output to visual studio Output window

That would be the proper output for OptiX *.cu device code without errors or warnings and default MSVS settings.

Which OptiX SDK version are you using?

If that is OptiX SDK 7.5.0, there was a small CMake script error inside only that SDK version which prevented the compiler messages to appear but I thought that only affected Linux.

Please have a look into this post for the solution:

You could also update to a newer OptiX SDK version where this is solved as well.

If you’re interested in what actually happens inside the Visual Studio build process, you can increase the MSBuild output verbosity inside the option
Menu → Tools → Options… → Projects and Solutions → Build And Run

There are two combo-boxes for the MSBuild project build output verbosity and the log file verbosity.
The default is Minimal and only prints basic information.
If you want to see the NVCC command line of that custom build rule, you need to switch the build verbosity to Detailed.