Help with Custom Slicer Build – Which Solution File (.sln) to Use in Visual Studio?

I have built a custom template of Kitware in Release mode using CMake GUI with the following directories:

  • Source code: E:/Safe
  • Binary build: E:/Safe/build

After configuring and generating the project, the build was successful. Now, I have two .sln files:

  1. build/safe.sln
  2. build/slicer_build/slicer.sln

I am confused about which .sln file I should open in Visual Studio to continue compiling and customizing 3D Slicer.

Could someone guide me on the correct approach? I’d really appreciate any help.

Thank you!

The first solution file will build all the dependencies as well as the Slicer core code. The 2nd solution file is only the Slicer core code.

If you’re using Windows and CMake-gui you can press the “open project” button after configure and generate steps as described at:

1 Like

First of all, thanks for the reply.

The initial build of my custom template is complete using the mentioned method (opening the project from CMake GUI and clicking on ALL_BUILD). My first build is ready.

However, I am confused about the next steps. If I want to add custom modules, change the logo, or make other modifications to my custom application, what are the correct steps? Also, which .sln file should I open in Visual Studio to build and see my changes?

As you can see, my application’s name is SafeSlicerApp, which I created using the Kitware blog.

I have opened build/slicer_build/slicer.sln