# Automatic detection of Visual Studio Community 2015 RC not working properly

**URL:** <https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309>\
**Category:** Bugs\
**Tags:** issue-acknowledged, gradle-3313, native\
**Created:** [June 26, 2015, 9:41pm UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309 "2015-06-26T21:41:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sherter](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@sherter](https://discuss.gradle.org/u/sherter)\
**Post date:** [June 26, 2015, 9:41pm UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/1 "2015-06-26T21:41:47Z")

</div>

I have installed Visual Studio Community 2015 RC in it’s default location. Gradle seems to pick up the location through the registry [1], but the compilation fails because standard headers (e.g. stdio.h) are not found.

When I manually specify the installDir

```
toolChains {
  visualCpp(VisualCpp) {
    installDir "C:/Program Files(x86)/Microsoft Visual Studio 14.0"
  }
}

```

it works fine. The INCLUDEs seem to be not detected properly for automatic detection.

I’m using the latest stable release of Gradle (2.4).

[1] ([DEBUG] [org.gradle.nativeplatform.toolchain.internal.msvcpp.DefaultVisualStudioLocator] Found Visual C++ 14.0 at C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC)

---

<div class="post-metadata">

**Author:** ![sterling](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sterling/32/5395_2.png) [@sterling](https://discuss.gradle.org/u/sterling)\
**Post date:** [June 26, 2015, 11:22pm UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/2 "2015-06-26T23:22:42Z")

</div>

Thanks! I’ve raised GRADLE-3313 We’ll need to expand our test matrix to include VS 2015.

Could you post your options.txt for compiling and linking with and without the installPath specified?

---

<div class="post-metadata">

**Author:** ![sherter](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@sherter](https://discuss.gradle.org/u/sherter)\
**Post date:** [June 27, 2015, 2:47am UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/3 "2015-06-27T02:47:59Z")

</div>

I tried it again on a clean example (the native-binaries/c sample from the gradle distribution) and found that manually specifying the installDir for VS 2015 doesn’t solve the problem. I must have messed up the paths in my first attempt.

Anyway, VS 2015 support is broken. Some headers (e.g. stdio.h) are no longer present in ${installDir}/include. They have moved to directory C:/Program Files (x86)/Windows Kits/10/Include/10.0.10056.0/ucrt/, which is not picked up by gradle.

There is a blog post that describes the changes for VS2015: [http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx](http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx)

options.txt:

```
/TC
/nologo
/c
/DDLL_EXPORT
/Zi
/Zi
/IE:\gradle-2.4\samples\native-binaries\c\src\hello\headers
"/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"
"/IC:\Program Files (x86)\Windows Kits\8.1\Include\shared"
"/IC:\Program Files (x86)\Windows Kits\8.1\Include\um"
```

---

<div class="post-metadata">

**Author:** ![philmcardle](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/philmcardle/32/5620_2.png) [@philmcardle](https://discuss.gradle.org/u/philmcardle)\
**Post date:** [October 25, 2016, 9:38am UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/4 "2016-10-25T09:38:56Z")

</div>

Is there an idea of when we can expect [PR 704](https://github.com/gradle/gradle/pull/704) to be merged and [GRADLE-3313](https://issues.gradle.org/browse/GRADLE-3313) to be resolved?

As far as I understand it, Microsoft introduced the breaking UCRT changes in March 2015, and they’ve already announced breaking changes for the next version - [Compiler Tools Layout in Visual Studio “15”](https://blogs.msdn.microsoft.com/vcblog/2016/10/07/compiler-tools-layout-in-visual-studio-15/), should we expect a similar delay in support for that too?

We’re working around the UCRT issues at the moment while using VS2015 (short of building from source with the mentioned PR), but I’m concerned that the changes in the next version won’t be as easy to work around.

Regards,

Phil

---

<div class="post-metadata">

**Author:** ![Daniel\_L](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/daniel_l/32/6420_2.png) [@Daniel\_L](https://discuss.gradle.org/u/Daniel_L)\
**Post date:** [October 25, 2016, 1:35pm UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/5 "2016-10-25T13:35:46Z")

</div>

Hi Phil,

Thanks for voicing your concern over this. We are actively priotizing this feature as well as considering a faster feedback loop for newer toolchain.

Regards,

Daniel

---

<div class="post-metadata">

**Author:** ![philmcardle](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/philmcardle/32/5620_2.png) [@philmcardle](https://discuss.gradle.org/u/philmcardle)\
**Post date:** [October 25, 2016, 1:37pm UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/6 "2016-10-25T13:37:06Z")

</div>

Thanks for getting back to me Daniel. That’s all I needed to know 🙂

Phil

---

<div class="post-metadata">

**Author:** ![zosrothko](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/zosrothko/32/5438_2.png) [@zosrothko](https://discuss.gradle.org/u/zosrothko)\
**Post date:** [October 25, 2016, 5:07pm UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/7 "2016-10-25T17:07:23Z")

</div>

Hi

There is already a PR solving this issue on Windows with VS2015: #704: [https://github.com/gradle/gradle/pull/704](https://github.com/gradle/gradle/pull/704)  
except it seems to break the Linux build with gcc… I am wokring on this now

---

<div class="post-metadata">

**Author:** ![alexgeek](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/alexgeek/32/5467_2.png) [@alexgeek](https://discuss.gradle.org/u/alexgeek)\
**Post date:** [November 5, 2016, 7:17pm UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/8 "2016-11-05T19:17:07Z")

</div>

Hey any news on this?

---

<div class="post-metadata">

**Author:** ![Daniel\_L](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/daniel_l/32/6420_2.png) [@Daniel\_L](https://discuss.gradle.org/u/Daniel_L)\
**Post date:** [November 7, 2016, 1:23pm UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/9 "2016-11-07T13:23:21Z")

</div>

Hi Alex,

I’m currently assigned to work on this PR/limitation in Gradle. You can follow the work done on [this Github issue](https://github.com/gradle/gradle/issues/753).

Thanks for your patience,

Daniel

---

<div class="post-metadata">

**Author:** ![zosrothko](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/zosrothko/32/5438_2.png) [@zosrothko](https://discuss.gradle.org/u/zosrothko)\
**Post date:** [November 7, 2016, 10:11pm UTC](https://discuss.gradle.org/t/automatic-detection-of-visual-studio-community-2015-rc-not-working-properly/10309/10 "2016-11-07T22:11:59Z")

</div>

The issue tha was breaking gcc compiling on Linux has been fixed and the fixes are commited on the PR#704… You can apply this PR locally in case of urgency waiting for the definitive solution from @Daniel_L
