Visual Studio GenerateResource Error Building on Windows 10

A couple of weeks ago when I installed Windows 10 on my primary machine I ran into an issue where Windows Phone/Windows/Universal applications stopped building due to a rather cryptic error relating to trusted network resources…. which was bizarre since the projects were all local on my machine. This is the same error reported on the Windows Dev Center –

The good news is that there’s a relatively simple fix as indicated in the error message ”please enable the loadFromRemoteSources switch. Of course this shouldn’t need to be applied but that’s the danger of running on the edge with a pre-release product. What’s not obvious is where the switch should be applied – if you follow the link to MSDN it seems to indicate that the switch needs to be added to Devenv.exe.config, which does nothing to fix the issue. Turns out you need to add it to the MSBuild configuration file (eg C:Program Files (x86)MSBuild12.0Bin MSBuild.exe.config).

<?xml version =”1.0″?>
        <section name=”msbuildToolsets” type=”Microsoft.Build.BuildEngine.ToolsetConfigurationSection, Microsoft.Build.Engine, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />
    <startup useLegacyV2RuntimeActivationPolicy=”true”>
        <supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.5.1″/>
    <loadFromRemoteSources enabled=”true”/>