{"action":"created","issue":{"url":"https://api.github.com/repos/fsharp/FAKE/issues/1776","repository_url":"https://api.github.com/repos/fsharp/FAKE","labels_url":"https://api.github.com/repos/fsharp/FAKE/issues/1776/labels{/name}","comments_url":"https://api.github.com/repos/fsharp/FAKE/issues/1776/comments","events_url":"https://api.github.com/repos/fsharp/FAKE/issues/1776/events","html_url":"https://github.com/fsharp/FAKE/issues/1776","id":294201158,"number":1776,"title":"dotnet-fake seems to not work when calling msbuild","user":{"login":"matthid","id":1866463,"avatar_url":"https://avatars0.githubusercontent.com/u/1866463?v=4","gravatar_id":"","url":"https://api.github.com/users/matthid","html_url":"https://github.com/matthid","followers_url":"https://api.github.com/users/matthid/followers","following_url":"https://api.github.com/users/matthid/following{/other_user}","gists_url":"https://api.github.com/users/matthid/gists{/gist_id}","starred_url":"https://api.github.com/users/matthid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthid/subscriptions","organizations_url":"https://api.github.com/users/matthid/orgs","repos_url":"https://api.github.com/users/matthid/repos","events_url":"https://api.github.com/users/matthid/events{/privacy}","received_events_url":"https://api.github.com/users/matthid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-04T14:29:32Z","updated_at":"2018-02-04T15:13:04Z","closed_at":null,"author_association":"COLLABORATOR","body":"### Description\r\n\r\nI just got some weird build-errors when trying to use `dotnet-fake` as dotnet-cli tool on AppVeyor. Maybe it was because of dotnet-sdk version issues or something else:\r\n\r\nhttps://github.com/fsprojects/FSharp.Formatting/pull/460\r\n\r\n### Repro steps\r\n\r\nRun https://github.com/fsprojects/FSharp.Formatting/pull/460/commits/e5901e73c65e33c9ebbe1145356691812101e10d on AppVeyor (https://ci.appveyor.com/project/matthid/fsharp-formatting-32np3/build/1.0.75).\r\n\r\nEdit: The error was\r\n\r\n```\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe  FSharp.Formatting.sln /t:Rebuild /m  /nodeReuse:False  /v:m   /p:RestorePackages=\"True\" /p:VisualStudioVersion=\"15.0\" /p:Verbosity=\"Minimal\" /p:Configuration=\"Release\" /logger:\"C:\\Program Files\\AppVeyor\\BuildAgent\\Appveyor.MSBuildLogger.dll\"\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe  FSharp.Formatting.sln /t:Rebuild /m  /nodeReuse:False  /v:m   /p:RestorePackages=\"True\" /p:VisualStudioVersion=\"15.0\" /p:Verbosity=\"Minimal\" /p:Configuration=\"Release\" /logger:\"C:\\Program Files\\AppVeyor\\BuildAgent\\Appveyor.MSBuildLogger.dll\"\r\nMicrosoft (R) Build Engine version 15.5.180.51428 for .NET Framework\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\nC:\\Program Files\\dotnet\\sdk\\2.1.4\\Microsoft.Common.CurrentVersion.targets(1601,5): error MSB4062: The \"NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask\" task could not be loaded from the assembly C:\\Program Files\\dotnet\\sdk\\2.1.4\\NuGet.Build.Tasks.dll. Could not load file or assembly 'NuGet.Build.Tasks, Version=4.5.0.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\\projects\\fsharp-formatting-32np3\\src\\FSharp.Markdown\\FSharp.Markdown.fsproj]\r\nC:\\Program Files\\dotnet\\sdk\\2.1.4\\Microsoft\\Microsoft.NET.Build.Extensions\\Microsoft.NET.Build.Extensions.NETFramework.targets(56,5): error MSB4062: The \"GetDependsOnNETStandard\" task could not be loaded from the assembly C:\\Program Files\\dotnet\\sdk\\2.1.4\\Microsoft\\Microsoft.NET.Build.Extensions\\\\tools\\net46\\Microsoft.NET.Build.Extensions.Tasks.dll. Could not load file or assembly 'file:///C:\\Program Files\\dotnet\\sdk\\2.1.4\\Microsoft\\Microsoft.NET.Build.Extensions\\tools\\net46\\Microsoft.NET.Build.Extensions.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\\projects\\fsharp-formatting-32np3\\src\\CSharpFormat\\CSharpFormat.csproj]\r\nC:\\Program Files\\dotnet\\sdk\\2.1.4\\Microsoft.Common.CurrentVersion.targets(1601,5): error MSB4062: The \"NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask\" task could not be loaded from the assembly C:\\Program Files\\dotnet\\sdk\\2.1.4\\NuGet.Build.Tasks.dll. Could not load file or assembly 'NuGet.Build.Tasks, Version=4.5.0.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\\projects\\fsharp-formatting-32np3\\tests\\FSharp.Markdown.Tests\\FSharp.Markdown.Tests.fsproj]\r\n```\r\n\r\nwhich indicates maybe some dotnet-cli stuff was overwritten/broken (as the working version executes exactly same command, see https://ci.appveyor.com/project/matthid/fsharp-formatting-32np3/build/1.0.69 for example)."},"comment":{"url":"https://api.github.com/repos/fsharp/FAKE/issues/comments/362913684","html_url":"https://github.com/fsharp/FAKE/issues/1776#issuecomment-362913684","issue_url":"https://api.github.com/repos/fsharp/FAKE/issues/1776","id":362913684,"user":{"login":"matthid","id":1866463,"avatar_url":"https://avatars0.githubusercontent.com/u/1866463?v=4","gravatar_id":"","url":"https://api.github.com/users/matthid","html_url":"https://github.com/matthid","followers_url":"https://api.github.com/users/matthid/followers","following_url":"https://api.github.com/users/matthid/following{/other_user}","gists_url":"https://api.github.com/users/matthid/gists{/gist_id}","starred_url":"https://api.github.com/users/matthid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthid/subscriptions","organizations_url":"https://api.github.com/users/matthid/orgs","repos_url":"https://api.github.com/users/matthid/repos","events_url":"https://api.github.com/users/matthid/events{/privacy}","received_events_url":"https://api.github.com/users/matthid/received_events","type":"User","site_admin":false},"created_at":"2018-02-04T15:13:04Z","updated_at":"2018-02-04T15:13:04Z","author_association":"COLLABORATOR","body":"The difference between `fake run myscript.fsx` and `dotnet fake run myscript.fsx` is:\r\n\r\n\r\n```diff\r\n--- fake_run.txt        2018-02-04 16:09:55.899220100 +0100\r\n+++ dotnet_fake_run.txt 2018-02-04 16:10:02.430051700 +0100\r\n@@ -1,4 +1,4 @@\r\n-$ fake run myscript.fsx\r\n+$ dotnet fake run myscript.fsx\r\n loading dependencies ...\r\n 'ACLOCAL_PATH' -> 'C:\\Program Files\\Git\\mingw64\\share\\aclocal;C:\\Program Files\\Git\\usr\\share\\aclocal'\r\n 'ALLUSERSPROFILE' -> 'C:\\ProgramData'\r\n@@ -6,7 +6,7 @@\r\n 'ANSICON_DEF' -> '7'\r\n 'APPDATA' -> 'C:\\Users\\matth\\AppData\\Roaming'\r\n 'CLINK_DIR' -> 'C:\\Program Files (x86)\\clink\\0.4.8'\r\n-'COMMONPROGRAMFILES' -> 'C:\\Program Files (x86)\\Common Files'\r\n+'COMMONPROGRAMFILES' -> 'C:\\Program Files\\Common Files'\r\n 'COMPUTERNAME' -> 'DESKTOP-FQBAN56'\r\n 'COMSPEC' -> 'C:\\Windows\\system32\\cmd.exe'\r\n 'CONFIG_SITE' -> 'C:/Program Files/Git/mingw64/etc/config.site'\r\n@@ -54,6 +54,7 @@\r\n 'MINGW_CHOST' -> 'x86_64-w64-mingw32'\r\n 'MINGW_PACKAGE_PREFIX' -> 'mingw-w64-x86_64'\r\n 'MINGW_PREFIX' -> 'C:/Program Files/Git/mingw64'\r\n+'MSBUILD_EXE_PATH' -> 'C:\\Program Files\\dotnet\\sdk\\2.1.4\\MSBuild.dll'\r\n 'MSYSTEM' -> 'MINGW64'\r\n 'MSYSTEM_CARCH' -> 'x86_64'\r\n 'MSYSTEM_CHOST' -> 'x86_64-w64-mingw32'\r\n@@ -70,12 +71,11 @@\r\n 'PATHEXT' -> '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'\r\n 'PKG_CONFIG_PATH' -> 'C:\\Program Files\\Git\\mingw64\\lib\\pkgconfig;C:\\Program Files\\Git\\mingw64\\share\\pkgconfig'\r\n 'PLINK_PROTOCOL' -> 'ssh'\r\n-'PROCESSOR_ARCHITECTURE' -> 'x86'\r\n-'PROCESSOR_ARCHITEW6432' -> 'AMD64'\r\n+'PROCESSOR_ARCHITECTURE' -> 'AMD64'\r\n 'PROCESSOR_IDENTIFIER' -> 'Intel64 Family 6 Model 158 Stepping 9, GenuineIntel'\r\n 'PROCESSOR_LEVEL' -> '6'\r\n 'PROCESSOR_REVISION' -> '9e09'\r\n-'PROGRAMFILES' -> 'C:\\Program Files (x86)'\r\n+'PROGRAMFILES' -> 'C:\\Program Files'\r\n 'PS1' -> '\\[\\033]0;$TITLEPREFIX:$PWD\\007\\]\\n\\[\\033[32m\\]\\u@\\h \\[\\033[35m\\]$MSYSTEM \\[\\033[33m\\]\\w\\[\\033[36m\\]`__git_ps1`\\[\\033[0m\\]\\n$ '\r\n 'PSModulePath' -> 'C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules'\r\n 'PUBLIC' -> 'C:\\Users\\Public'\r\n@@ -98,4 +98,4 @@\r\n 'USERNAME' -> 'matth'\r\n 'USERPROFILE' -> 'C:\\Users\\matth'\r\n 'WINDIR' -> 'C:\\Windows'\r\n-'_' -> 'C:/ProgramData/chocolatey/bin/fake'\r\n\\ No newline at end of file\r\n+'_' -> 'C:/Program Files/dotnet/dotnet'\r\n\\ No newline at end of file\r\n```\r\nretrieved with\r\n\r\n```fsharp\r\n\r\n\r\nseq { for d in System.Environment.GetEnvironmentVariables() do let de = d :?> System.Collections.DictionaryEntry in yield (de.Key.ToString(), de.Value.ToString()) }\r\n    |> Seq.sortBy fst\r\n    |> Seq.iter (fun (key, value) -> printfn \"'%O' -> '%O'\" key value)\r\n```\r\n\r\nThe `'MSBUILD_EXE_PATH'` looks promising\r\n"}}
{"actor":{"display_login":"matthid"}}