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

**URL:** <https://discourse.slicer.org/t/help-with-custom-slicer-build-which-solution-file-sln-to-use-in-visual-studio/42062>\
**Category:** Support\
**Created:** [March 11, 2025, 4:42am UTC](https://discourse.slicer.org/t/help-with-custom-slicer-build-which-solution-file-sln-to-use-in-visual-studio/42062 "2025-03-11T04:42:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/software/32/79627_2.png) [@software](https://discourse.slicer.org/u/software)\
**Post date:** [March 11, 2025, 4:42am UTC](https://discourse.slicer.org/t/help-with-custom-slicer-build-which-solution-file-sln-to-use-in-visual-studio/42062/1 "2025-03-11T04:42:57Z")

</div>

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!**

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [March 11, 2025, 8:08am UTC](https://discourse.slicer.org/t/help-with-custom-slicer-build-which-solution-file-sln-to-use-in-visual-studio/42062/2 "2025-03-11T08:08:45Z")

</div>

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:

> **[Windows — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html#using-graphical-user-interface-alternative-solution)**

---

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/software/32/79627_2.png) [@software](https://discourse.slicer.org/u/software)\
**Post date:** [March 11, 2025, 9:55am UTC](https://discourse.slicer.org/t/help-with-custom-slicer-build-which-solution-file-sln-to-use-in-visual-studio/42062/3 "2025-03-11T09:55:30Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/software/32/79627_2.png) [@software](https://discourse.slicer.org/u/software)\
**Post date:** [March 11, 2025, 10:04am UTC](https://discourse.slicer.org/t/help-with-custom-slicer-build-which-solution-file-sln-to-use-in-visual-studio/42062/4 "2025-03-11T10:04:49Z")

</div>

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`**

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/7/07cf6dc9cbd3266f7debcab5b5e638a00189756e.png)
