# How to set the Visual Studio version?

**URL:** <https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386>\
**Category:** Getting Started & Setup\
**Tags:** workflow, setup, unreal-engine, Installation, Visual-Studio, question\
**Created:** [December 30, 2017, 5:32am UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386 "2017-12-30T05:32:51Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takatu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/takatu/32/976600_2.png) [@Takatu](https://forums.unrealengine.com/u/Takatu)\
**Post date:** [December 30, 2017, 5:32am UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/1 "2017-12-30T05:32:51Z")

</div>

Hi,  
I have VS2015 and VS2017 installed but Unreal 4.18 generates always only VS2015 solution files. Visual Studio 2017 got installed first and I installed Visual Studio 2015 later to open an old Unreal 4.13 project.

How can I select the Visual Studio version I want to work with?

Thanks

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9fcda7641](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9fcda7641](https://forums.unrealengine.com/u/anonymous_user_9fcda7641)\
**Post date:** [December 30, 2017, 6:22am UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/2 "2017-12-30T06:22:00Z")

</div>

Go to Edit-\>Project Settings-\> Platforms-\> Windows → Toolchain -\>CompilerVersion. You can switch between Visual Studio 2015 or 2017.

---

<div class="post-metadata">

**Author:** ![Takatu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/takatu/32/976600_2.png) [@Takatu](https://forums.unrealengine.com/u/Takatu)\
**Post date:** [December 30, 2017, 6:24am UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/3 "2017-12-30T06:24:45Z")

</div>

Thanks. That is exactly what I’m looking for. I must have overseen it when I checked the settings. … But it seems to have no effect. I have now VS2017 set as compiler but Unreal still generates VS2015 solution files.

---

<div class="post-metadata">

**Author:** ![Mellnik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mellnik](https://forums.unrealengine.com/u/Mellnik)\
**Post date:** [December 31, 2017, 12:56pm UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/4 "2017-12-31T12:56:26Z")

</div>

Got the same problem, selected VS2017 but still opens 2015.

---

<div class="post-metadata">

**Author:** ![NMouzourakis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NMouzourakis](https://forums.unrealengine.com/u/NMouzourakis)\
**Post date:** [January 12, 2018, 8:03pm UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/5 "2018-01-12T20:03:44Z")

</div>

Hi, I’m having the same issue on 4.18.2. Is this a known issue yet?

---

<div class="post-metadata">

**Author:** ![janimationd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@janimationd](https://forums.unrealengine.com/u/janimationd)\
**Post date:** [February 15, 2018, 11:16pm UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/6 "2018-02-15T23:16:45Z")

</div>

I’m also having this issue, changing the setting to 2017 in a fresh project then adding my first C++ class sets the compiler version to 2015.

---

<div class="post-metadata">

**Author:** ![janimationd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@janimationd](https://forums.unrealengine.com/u/janimationd)\
**Post date:** [February 16, 2018, 5:32pm UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/7 "2018-02-16T17:32:10Z")

</div>

So… apparently there is an ENGINE setting (under Edit-\>Editor Preferences) as well as a PROJECT setting for this. Changing the PROJECT setting then rebuilding the Visual Studio project only did not work for me until I also changed the ENGINE setting. The engine setting is under the “Source Code” section.

---

<div class="post-metadata">

**Author:** ![Sandstorm84](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sandstorm84](https://forums.unrealengine.com/u/Sandstorm84)\
**Post date:** [March 29, 2018, 9:18am UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/8 "2018-03-29T09:18:39Z")

</div>

To Disambiguate: He’s talking about the engine settings under Edit → Editor preferences → General → Source code

Reason I comment this is that I was looking for a source code area under the Engine tab, in the PROJECT settings - which didn’t exist 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3f422bcf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3f422bcf](https://forums.unrealengine.com/u/anonymous_user_3f422bcf)\
**Post date:** [January 16, 2019, 3:42pm UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/9 "2019-01-16T15:42:25Z")

</div>

You should change the editor in Edit \> Editor Preferences \> General \> Source Code \> Source Code Editor

---

<div class="post-metadata">

**Author:** ![Velo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Velo](https://forums.unrealengine.com/u/Velo)\
**Post date:** [April 13, 2019, 9:43pm UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/10 "2019-04-13T21:43:04Z")

</div>

I had to change both the Engine and Project preference settings as stated in other comments. Then completely close out of my game project (i.e. close UE4 completely). Then “Regenerate project files” (or whatever that’s called I forget) in the project folder on the disk. After generating project files, then I was able to reopen my game project in UE4 and Unreal finally started using Visual Studio 2017 for me (instead of 2015)!

---

<div class="post-metadata">

**Author:** ![Waves](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/waves/32/1009258_2.png) [@Waves](https://forums.unrealengine.com/u/Waves)\
**Post date:** [June 7, 2019, 1:31am UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/11 "2019-06-07T01:31:06Z")

</div>

There is no need to compile the editor just to change the compiler setting. In your project directory update the following files:

File: Config/DefaultEngine.ini

```
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
Compiler=VisualStudio2019
```

File: Config/DefaultEditorPerProjectUserSettings.ini

```
[/Script/SourceCodeAccess.SourceCodeAccessSettings]
PreferredAccessor=VisualStudio2019
```

That should let you compile with your chosen version of visual studio instead of doing it twice.

---

<div class="post-metadata">

**Author:** ![Stroganoff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stroganoff](https://forums.unrealengine.com/u/Stroganoff)\
**Post date:** [July 26, 2021, 6:13am UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/12 "2021-07-26T06:13:44Z")

</div>

I’m trying to upgrade my VS version from 2017 to 2019, See attached image on how I have attempted to change the engine version.

 ![344886-nodeal.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/b/a/4ba2e7c658fa18b2cec25b2d9688fa40a5ad3c56.jpeg)

After Changing “Source Editor” and “Compiler Version” to Visual Studio 2019 in the Editor I restarted and regenerate the Visual Studio project files but they still come back as VS 2017.  
I’m using a source-built version of the engine, does that have implications? if so how do I change Code Editor on a source-built version of the engine?

---

<div class="post-metadata">

**Author:** ![Stroganoff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stroganoff](https://forums.unrealengine.com/u/Stroganoff)\
**Post date:** [July 26, 2021, 6:21am UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/13 "2021-07-26T06:21:07Z")

</div>

The answerhub is broken for me so I’m asking here 😑 This question was the closest to my question

---

<div class="post-metadata">

**Author:** ![mlagares](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mlagares](https://forums.unrealengine.com/u/mlagares)\
**Post date:** [August 15, 2023, 5:15am UTC](https://forums.unrealengine.com/t/how-to-set-the-visual-studio-version/413386/14 "2023-08-15T05:15:36Z")

</div>

I am running UE 5.2 My VS solution file opens in VS 2019 and the Lyra Starter Game sample project is incompatible with that version so I need it to open the solution in 2022.

I applied changes as per above, modifying project settings and editor preferences. I then checked and modified the files DefaultEngine.ini and DefaultEditorPerProjectUserSettings.ini as indicated above. I rebuilt the project. Still opens in 2019.

I can get round the problem by right clicking the solution file, choosing “Open with” and then selecting the VS version I need but I would like to know what I am missing. Does anyone else have this problem?
