{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/778","repository_url":"https://api.github.com/repos/Microsoft/msbuild","labels_url":"https://api.github.com/repos/Microsoft/msbuild/issues/778/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/msbuild/issues/778/comments","events_url":"https://api.github.com/repos/Microsoft/msbuild/issues/778/events","html_url":"https://github.com/Microsoft/msbuild/issues/778","id":165197294,"number":778,"title":"Microsoft.AppxPackage.Targets causes build failures","user":{"login":"Sarabeth-Jaffe-Microsoft","id":18562889,"avatar_url":"https://avatars.githubusercontent.com/u/18562889?v=3","gravatar_id":"","url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft","html_url":"https://github.com/Sarabeth-Jaffe-Microsoft","followers_url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft/followers","following_url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft/orgs","repos_url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft/repos","events_url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Sarabeth-Jaffe-Microsoft/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/msbuild/labels/backlog","name":"backlog","color":"c7def8"},{"url":"https://api.github.com/repos/Microsoft/msbuild/labels/up-for-grabs","name":"up-for-grabs","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-07-12T22:34:06Z","updated_at":"2016-09-22T02:05:40Z","closed_at":null,"body":"**Customer reported the following issue:**\r\n\r\nDescription: When attempting to run a build using MSBuild in a batch file, projects are failing due to the following exception: \r\n```\r\nC:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v14.0\\AppxPackage\\Microsoft.AppXPackage.Targets(283,22): error MSB4086: A numeric comparison was attempted on \"10.0.11000.0\" that evaluates to \"10.0.11000.0\" instead of a number, in condition \"'$(TargetPlatformVersion)' >= '10.0.11000.0'\". [MyProject.csproj] \r\n```\r\n\r\n This appears to be caused by the following segment within Microsoft.AppXPackage.Targets: \r\n```XML\r\n <PropertyGroup> \r\n <SdkIsRS1OrLater>False</SdkIsRS1OrLater> \r\n <SdkIsRS1OrLater Condition=\"'$(TargetPlatformVersion)' &gt;= '10.0.11000.0'\">True</SdkIsRS1OrLater> \r\n </PropertyGroup> \r\n```\r\nSwitching the VisualStudioVersion flag in the batch file from 14.0 to 12.0 causes this batch file to build successfully. Additionally, it was running fine with 14.0 prior to the upgrade to Update 3. \r\n\r\n Strangely, this appears to build fine when running directly inside Visual Studio. \r\n\r\n Visual Studio Version: 14.0.25421.03 \r\n\r\n Repro Steps:Create a batch file with the following script. When running the build, the error will surface. \r\n```\r\n @echo off \r\n set CLRHome=%SystemRoot%\\Microsoft.NET\\Framework\\v4.0.30319 \r\n set MSTestDir=%vs140comnTools%..\\IDE \r\n Set VisualStudioVersion=14.0 \r\n set Path=%Path%;%CLRHome%;%MSTestDir% \r\n\r\n MSBuild ./LocalBuild.proj /v:m /clp:Summary; /m:%multiCore% /nr:False /nologo \r\n```\r\nImpact: Builds are unable to run with ToolsVersion 14.0. Any developer running exclusively 2015 updating to Update 3 will be unable to build the solutions from the batch files.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/comments/248792979","html_url":"https://github.com/Microsoft/msbuild/issues/778#issuecomment-248792979","issue_url":"https://api.github.com/repos/Microsoft/msbuild/issues/778","id":248792979,"user":{"login":"StacyHenwood","id":13844983,"avatar_url":"https://avatars.githubusercontent.com/u/13844983?v=3","gravatar_id":"","url":"https://api.github.com/users/StacyHenwood","html_url":"https://github.com/StacyHenwood","followers_url":"https://api.github.com/users/StacyHenwood/followers","following_url":"https://api.github.com/users/StacyHenwood/following{/other_user}","gists_url":"https://api.github.com/users/StacyHenwood/gists{/gist_id}","starred_url":"https://api.github.com/users/StacyHenwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StacyHenwood/subscriptions","organizations_url":"https://api.github.com/users/StacyHenwood/orgs","repos_url":"https://api.github.com/users/StacyHenwood/repos","events_url":"https://api.github.com/users/StacyHenwood/events{/privacy}","received_events_url":"https://api.github.com/users/StacyHenwood/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T02:05:40Z","updated_at":"2016-09-22T02:05:40Z","body":"Ok, so I have managed to get the correct version of MSBuild to run in my builds. \r\n\r\nIts definitely a hack, but its the only way I could get this to work properly.\r\n\r\nI have changed the following Registry keys:\r\n```\r\nHKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\MSBuild\\12.0\\MSBuildOverrideTasksPath\r\nHKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\MSBuild\\ToolsVersions\\12.0\\MSBuildToolsPath\r\n```\r\n\r\nfrom: \r\n`C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\`\r\n\r\nto: \r\n`C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\`\r\n\r\nI realise that this is most definitely not going to be the recommended way of doing this, but there seems to be no way of forcing TFSBuild to use the correct version any other way. "}}
{"actor":{"display_login":"StacyHenwood"}}