# UnrealBuildTool could not compile - Something to do with Roslyn?

**URL:** <https://forums.unrealengine.com/t/unrealbuildtool-could-not-compile-something-to-do-with-roslyn/93647>\
**Category:** C++\
**Tags:** unreal-engine, Engine-Source-Code, GitHub\
**Created:** [June 3, 2017, 2:58pm UTC](https://forums.unrealengine.com/t/unrealbuildtool-could-not-compile-something-to-do-with-roslyn/93647 "2017-06-03T14:58:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadd518](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadd518](https://forums.unrealengine.com/u/Shadd518)\
**Post date:** [June 3, 2017, 2:58pm UTC](https://forums.unrealengine.com/t/unrealbuildtool-could-not-compile-something-to-do-with-roslyn/93647/1 "2017-06-03T14:58:29Z")

</div>

I’m trying to build Unreal Engine from source, but when I do I run into this error when running the GenerateProjectFiles.bat:

```auto

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Microsoft.CSharp.CurrentVersion.targets(
321,5): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0
\bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct,
 and that the file exists on disk. [C:\UnrealEngine-release\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cspr
oj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Microsoft.CSharp.CurrentVersion.targets(
321,5): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0
\bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct,
 and that the file exists on disk. [C:\UnrealEngine-release\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cspr
oj]

```

Any idea what could be causing this? I don’t have a Roslyn folder, but I don’t know why it would be looking for that in the first place. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Zeblote](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeblote](https://forums.unrealengine.com/u/Zeblote)\
**Post date:** [June 3, 2017, 3:49pm UTC](https://forums.unrealengine.com/t/unrealbuildtool-could-not-compile-something-to-do-with-roslyn/93647/2 "2017-06-03T15:49:17Z")

</div>

Did you install the “desktop development with .net” package for VS? Unreal build tool is written in C#, so it’s necessary to compile it.

---

<div class="post-metadata">

**Author:** ![Shadd518](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadd518](https://forums.unrealengine.com/u/Shadd518)\
**Post date:** [June 4, 2017, 12:24am UTC](https://forums.unrealengine.com/t/unrealbuildtool-could-not-compile-something-to-do-with-roslyn/93647/3 "2017-06-04T00:24:28Z")

</div>

Ah, yep. That did it! Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Enginuity](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/enginuity/32/983199_2.png) [@Enginuity](https://forums.unrealengine.com/u/Enginuity)\
**Post date:** [April 29, 2018, 10:03am UTC](https://forums.unrealengine.com/t/unrealbuildtool-could-not-compile-something-to-do-with-roslyn/93647/4 "2018-04-29T10:03:07Z")

</div>

Did it for me too 🙂

---

<div class="post-metadata">

**Author:** ![Jake1337](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jake1337](https://forums.unrealengine.com/u/Jake1337)\
**Post date:** [May 10, 2018, 8:06am UTC](https://forums.unrealengine.com/t/unrealbuildtool-could-not-compile-something-to-do-with-roslyn/93647/5 "2018-05-10T08:06:00Z")

</div>

Same here - thanks a lot ! \<3

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_78e1ecff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_78e1ecff](https://forums.unrealengine.com/u/anonymous_user_78e1ecff)\
**Post date:** [August 29, 2020, 2:59pm UTC](https://forums.unrealengine.com/t/unrealbuildtool-could-not-compile-something-to-do-with-roslyn/93647/6 "2020-08-29T14:59:19Z")

</div>

fixed! thanks

---

<div class="post-metadata">

**Author:** ![Renardjojo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Renardjojo](https://forums.unrealengine.com/u/Renardjojo)\
**Post date:** [January 27, 2022, 10:19am UTC](https://forums.unrealengine.com/t/unrealbuildtool-could-not-compile-something-to-do-with-roslyn/93647/7 "2022-01-27T10:19:52Z")

</div>

For me, I did install “desktop development with C++” and it work. Thank for you reply, it help me to found the solution
