Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use on OSX #61

Closed
rmarinho opened this issue Dec 21, 2017 · 13 comments
Closed

Cannot use on OSX #61

rmarinho opened this issue Dec 21, 2017 · 13 comments

Comments

@rmarinho
Copy link

Error on OSX

/Users/rmarinho/.nuget/packages/gitinfo/2.0.8/build/GitInfo.targets(4,4): Error MSB4186: Invalid static method invocation syntax: "[MSBuild]::Add('$(GitBaseVersionPatch)', '$(GitCommits)')". Method '[MSBuild]::Add' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)).  (MSB4186) (TriggerVSTS)

Line 742 of GitInfo.targets

@kzu
Copy link
Member

kzu commented Dec 21, 2017

Are you using the now obsolete xbuild by chance?

@rmarinho
Copy link
Author

i was running azure function project from VS4MAC i m gonna try from command line to check

@rmarinho
Copy link
Author

happens the same using dotnet or msbuild

dotnet build TriggerVSTS.csproj 
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

EXEC : warning : refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]
EXEC : warning : refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]
EXEC : warning : refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]
/Users/rmarinho/.nuget/packages/gitinfo/2.0.8/build/GitInfo.targets(692,3): warning MSB3073: The command "git rev-list --count warning: refname 'HEAD' is ambiguous.;0cee310" exited with code 127. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]
/Users/rmarinho/.nuget/packages/gitinfo/2.0.8/build/GitInfo.targets(742,4): error MSB4186: Invalid static method invocation syntax: "[MSBuild]::Add('$(GitBaseVersionPatch)', '$(GitCommits)')". [MSBuild]::Add Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)).  [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]

@rmarinho
Copy link
Author

msbuild TriggerVSTS.csproj 
Microsoft (R) Build Engine version 15.4.0.0 (master/f296e67b Wed Oct 25 12:26:03 EDT 2017) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 12/22/2017 12:10:27 PM.
Project "/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj" on node 1 (default targets).
EXEC : warning : refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]
  The command "git diff-index --quiet HEAD" exited with code 1.
EXEC : warning : refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]
EXEC : warning : refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]
_GitBaseVersionTagExists:
  The command "git describe --tags --abbrev=0" exited with code 128.
/Users/rmarinho/.nuget/packages/gitinfo/2.0.8/build/GitInfo.targets(692,3): warning MSB3073: The command "git rev-list --count warning: refname 'HEAD' is ambiguous.;0cee310" exited with code 127. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]
  The previous error was converted to a warning because the task was called with ContinueOnError=true.
  Build continuing because "ContinueOnError" on the task "Exec" is set to "true".
/Users/rmarinho/.nuget/packages/gitinfo/2.0.8/build/GitInfo.targets(742,4): error MSB4186: Invalid static method invocation syntax: "[MSBuild]::Add('$(GitBaseVersionPatch)', '$(GitCommits)')". Method '[MSBuild]::Add' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)).  [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]
Done Building Project "/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj" (default targets) -- FAILED.

Build FAILED.

"/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj" (default target) (1) ->
(_GitRoot target) -> 
  EXEC : warning : refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]


"/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj" (default target) (1) ->
(_GitCommit target) -> 
  EXEC : warning : refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]


"/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj" (default target) (1) ->
  EXEC : warning : refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]


"/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj" (default target) (1) ->
(_GitBaseVersionFallback target) -> 
  /Users/rmarinho/.nuget/packages/gitinfo/2.0.8/build/GitInfo.targets(692,3): warning MSB3073: The command "git rev-list --count warning: refname 'HEAD' is ambiguous.;0cee310" exited with code 127. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]


"/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj" (default target) (1) ->
(_GitPopulateVersionInfo target) -> 
  /Users/rmarinho/.nuget/packages/gitinfo/2.0.8/build/GitInfo.targets(742,4): error MSB4186: Invalid static method invocation syntax: "[MSBuild]::Add('$(GitBaseVersionPatch)', '$(GitCommits)')". Method '[MSBuild]::Add' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)).  [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]

    4 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.52

@kzu
Copy link
Member

kzu commented Dec 22, 2017

I need a /bl plz. Also, most likely, the invocation is failing because either of the arguments isn't a number ;).

But rest assured that this is not a global failure to run on OSX. We're using this everywhere ;)

@rmarinho
Copy link
Author

@kzu right i use it on Flex on OSX and it works.. but it's netstandard2.0 project not net4.7 i wonder if it's that..

@kzu
Copy link
Member

kzu commented Dec 22, 2017

without a binary log, almost impossible to say...

@kzu
Copy link
Member

kzu commented Dec 27, 2017

binlog or closing in a week @rmarinho ;)

@rmarinho
Copy link
Author

I m on vacations :p

@kzu
Copy link
Member

kzu commented Dec 29, 2017

Let's hope it ends within a week then :p

@rmarinho
Copy link
Author

rmarinho commented Jan 2, 2018

msbuild.binlog.zip

@kzu
Copy link
Member

kzu commented Jan 3, 2018

Just as I suspected, GitCommits is set to a very weird value:

fatal: Invalid object name %27warning%27.;/var/folders/92/5fbvyz_d7rv16mwndjy8xdlm0000gn/T/tmp18b6a4033cb04686b06cf4eed86389ac.exec.cmd: line 2: 67baac6: command not found

from

/Users/rmarinho/.nuget/packages/gitinfo/2.0.8/build/GitInfo.targets(692,3): warning MSB3073: The command "git rev-list --count warning: refname 'HEAD' is ambiguous.;67baac6" exited with code 127. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]

Which means the the rev-list --count command is running with a GitCommit=warning: refname 'HEAD' is ambiguous.;67baac6, which comes from the _GitCommit target which runs git log --format=format:%h -n 1 and is getting

EXEC refname 'HEAD' is ambiguous. [/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.Build/TriggerVSTS/TriggerVSTS/TriggerVSTS.csproj]

Can you run those commands locally and see why you're getting that ambiguous thing?

@kzu
Copy link
Member

kzu commented Aug 3, 2018

Ok, closing until we get more info.

@kzu kzu closed this as completed Aug 3, 2018
@devlooped devlooped locked and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants