# WindowsTargetRules.GetVisualStudioCompilerName throws exception for XboxOne starting in 4.16

**URL:** <https://forums.unrealengine.com/t/windowstargetrules-getvisualstudiocompilername-throws-exception-for-xboxone-starting-in-4-16/404123>\
**Category:** Pipeline & Plugins\
**Tags:** visual-c-platform-to, unreal-engine, Visual-Studio, question\
**Created:** [September 8, 2017, 9:21pm UTC](https://forums.unrealengine.com/t/windowstargetrules-getvisualstudiocompilername-throws-exception-for-xboxone-starting-in-4-16/404123 "2017-09-08T21:21:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qartar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Qartar](https://forums.unrealengine.com/u/Qartar)\
**Post date:** [September 8, 2017, 9:21pm UTC](https://forums.unrealengine.com/t/windowstargetrules-getvisualstudiocompilername-throws-exception-for-xboxone-starting-in-4-16/404123/1 "2017-09-08T21:21:09Z")

</div>

Prior to 4.16 it was possible to use **Target.WindowsPlatform.GetVisualStudioCompilerVersionName()** to determine the version of Visual Studio being used even when building for XboxOne. However, in 4.16 and 4.17 **WindowsTargetRules.Compiler** is set to **WindowsCompiler.Default** when building for XboxOne which throws an exception inside of **GetVisualStudioCompilerVersionName()**. It’s not possible to use the corresponding function in **XboxOneTargetRules** because it isn’t declared in the partial class ( **PlatformTargetRules.cs** ) and UnrealBuildTool will fail to compile when XboxOne platform files aren’t available.

We use this function to determine the path of library dependencies. Because of this problem we have resorted to hard-coding the path. Is there a programmatic solution we’re missing? Should a function prototype for this be added to the **ReadOnlyXboxOneTargetRules** partial class in **PlatformTargetRules.cs**?
