# Canonical way to set the Visual Studio solution (.sln) filename?

**URL:** <https://discourse.cmake.org/t/canonical-way-to-set-the-visual-studio-solution-sln-filename/7482>\
**Category:** Code\
**Tags:** gen:vs\
**Created:** [February 17, 2023, 2:07am UTC](https://discourse.cmake.org/t/canonical-way-to-set-the-visual-studio-solution-sln-filename/7482 "2023-02-17T02:07:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinniefalco](https://discourse.cmake.org/user_avatar/discourse.cmake.org/vinniefalco/32/3178_2.png) [@vinniefalco](https://discourse.cmake.org/u/vinniefalco)\
**Post date:** [February 17, 2023, 2:07am UTC](https://discourse.cmake.org/t/canonical-way-to-set-the-visual-studio-solution-sln-filename/7482/1 "2023-02-17T02:07:30Z")

</div>

I am trying to control the filename of the Visual Studio solution generated when using CMake:

```auto
if( NOT DEFINED BOOST_PROJECT_NAME )
  set( BOOST_PROJECT_NAME "Boost" )
endif()
project( ${BOOST_PROJECT_NAME} VERSION 1.82.0 LANGUAGES CXX )

```

However the owner of the script says " The project name is significant and changing it just to rename the .sln file is not the right fix. You should ask in [the CMake discourse](https://discourse.cmake.org/) whether there’s a way to change the name of the generated .sln file without changing the CMake project name."

Is there another way to control the filename of the resulting .sln file without changing the project name?

Thanks!
