# GenerateProjectFiles ERROR: We couldn't find a valid installation of Visual Studio

**URL:** <https://forums.unrealengine.com/t/generateprojectfiles-error-we-couldnt-find-a-valid-installation-of-visual-studio/397747>\
**Category:** Pipeline & Plugins\
**Tags:** generateprojectfiles, source-code, unreal-engine, Visual-Studio, UE4, question\
**Created:** [July 21, 2017, 7:47pm UTC](https://forums.unrealengine.com/t/generateprojectfiles-error-we-couldnt-find-a-valid-installation-of-visual-studio/397747 "2017-07-21T19:47:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_afcef5c8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_afcef5c8](https://forums.unrealengine.com/u/anonymous_user_afcef5c8)\
**Post date:** [July 21, 2017, 7:47pm UTC](https://forums.unrealengine.com/t/generateprojectfiles-error-we-couldnt-find-a-valid-installation-of-visual-studio/397747/1 "2017-07-21T19:47:00Z")

</div>

First Sorry For my poor English.

GenerateProjectFiles.bat running by double-clicking does not compile UE4 sourse code (Please see screenshot\_3.png)

There are some informations in my computer:  
OS: windows 10 x64

Visual Studio: Visual Studio 2017 (26430.16) Release (Please see screenshot\_4.png)

Unreal Engine: 4.16.2 Release

VS150COMNTOOLS system variable: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools  
(Please see screenshot\_6.png)

What else to check ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_afcef5c8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_afcef5c8](https://forums.unrealengine.com/u/anonymous_user_afcef5c8)\
**Post date:** [July 23, 2017, 7:29am UTC](https://forums.unrealengine.com/t/generateprojectfiles-error-we-couldnt-find-a-valid-installation-of-visual-studio/397747/2 "2017-07-23T07:29:56Z")

</div>

After it is added to the variable Path "C:\Windows\System32"  
C:\Users\Paul.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Windows\System32\

Now when you start GenerateProjectFiles.bat, another error occurred:

Setting up Unreal Engine 4 project files…  
C:\Program Files (x86)\Microsoft Visual studio\2017\Community\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(1111,5):  
error MSB3644: reference assemblies for the platform “.NETFramework, Version = v4.5” were not found.  
To eliminate this error Batch, install the SDK or targeting package for this version of the platform, or change the target application platform to  
The version for which the SDK or the targeting package is installed. Note that the assembly will be resolved from the global cache collection  
(GAC) and used instead of referenced assemblies. Therefore, they may misuse the selected platform as a Target.  
[I:\UnrealEngine-release\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]

GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.

Press any key to continue . . .

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_afcef5c8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_afcef5c8](https://forums.unrealengine.com/u/anonymous_user_afcef5c8)\
**Post date:** [July 30, 2017, 8:01am UTC](https://forums.unrealengine.com/t/generateprojectfiles-error-we-couldnt-find-a-valid-installation-of-visual-studio/397747/3 "2017-07-30T08:01:30Z")

</div>

(Error MSB3644: reference assemblies for the platform “.NETFramework, Version = v4.5” were not found)

## Solution:

1. Clean up the System from the “.NET Framework All Versions” using cleanup\_tool (see screenshot\_01)

Download place dotnetfx\_cleanup\_tool  
Internet. Base tools. Net cleaning is available for download at the following locations:

> **[.NET Framework Cleanup Tool User's Guide](https://learn.microsoft.com/en-us/archive/blogs/astebner/net-framework-cleanup-tool-users-guide)**

[Http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog\_Tools/dotnetfx\_cleanup\_tool.zip](Http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/dotnetfx_cleanup_tool.zip)

Restart windows

* * *

 ![203349-screenshot_01.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/6/266833c4ab58b8c3c9595cd586a0cccdc672076a.jpeg)

## screenshot\_01

* * *

2/. Reinstalling NET. Framework:  
Run the installer vs\_community\_2017.exe, then click “change” to uncheck c NET.  
After that, again “change” and tick off against NET. (see screenshot\_02)

* * *

 ![203350-screenshot_02.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/c/3cca47d21c6282dab4816601d10ad58e626676f4.png)

## screenshot\_02

* * *

3/. In GenerateProjectFiles.bat in line number 4 add " -2017" without the quotes (see screenshot\_03)

* * *

 ![203351-screenshot_03.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/6/0b62255bed78317a0aa6406fae22a8ffba91f99b.jpeg)

## screenshot\_03

* * *

Starting GenerateProjectFiles.bat

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_afcef5c8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_afcef5c8](https://forums.unrealengine.com/u/anonymous_user_afcef5c8)\
**Post date:** [August 16, 2017, 2:32pm UTC](https://forums.unrealengine.com/t/generateprojectfiles-error-we-couldnt-find-a-valid-installation-of-visual-studio/397747/4 "2017-08-16T14:32:33Z")

</div>

But, in the end, the compilation in the visual studio itself did not work. Now installed UE4 version 4.16.3 on Linux, and everything works
