{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2354","repository_url":"https://api.github.com/repos/Microsoft/vsts-tasks","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2354/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2354/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2354/events","html_url":"https://github.com/Microsoft/vsts-tasks/issues/2354","id":173798592,"number":2354,"title":"NuGet Packager not picking up environment variable for -version in VSTS task","user":{"login":"jdshkolnik","id":2047520,"avatar_url":"https://avatars.githubusercontent.com/u/2047520?v=3","gravatar_id":"","url":"https://api.github.com/users/jdshkolnik","html_url":"https://github.com/jdshkolnik","followers_url":"https://api.github.com/users/jdshkolnik/followers","following_url":"https://api.github.com/users/jdshkolnik/following{/other_user}","gists_url":"https://api.github.com/users/jdshkolnik/gists{/gist_id}","starred_url":"https://api.github.com/users/jdshkolnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdshkolnik/subscriptions","organizations_url":"https://api.github.com/users/jdshkolnik/orgs","repos_url":"https://api.github.com/users/jdshkolnik/repos","events_url":"https://api.github.com/users/jdshkolnik/events{/privacy}","received_events_url":"https://api.github.com/users/jdshkolnik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels/Area:%20Packaging","name":"Area: Packaging","color":"5319e7"}],"state":"closed","locked":false,"assignee":{"login":"zjrunner","id":1724619,"avatar_url":"https://avatars.githubusercontent.com/u/1724619?v=3","gravatar_id":"","url":"https://api.github.com/users/zjrunner","html_url":"https://github.com/zjrunner","followers_url":"https://api.github.com/users/zjrunner/followers","following_url":"https://api.github.com/users/zjrunner/following{/other_user}","gists_url":"https://api.github.com/users/zjrunner/gists{/gist_id}","starred_url":"https://api.github.com/users/zjrunner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zjrunner/subscriptions","organizations_url":"https://api.github.com/users/zjrunner/orgs","repos_url":"https://api.github.com/users/zjrunner/repos","events_url":"https://api.github.com/users/zjrunner/events{/privacy}","received_events_url":"https://api.github.com/users/zjrunner/received_events","type":"User","site_admin":false},"assignees":[{"login":"zjrunner","id":1724619,"avatar_url":"https://avatars.githubusercontent.com/u/1724619?v=3","gravatar_id":"","url":"https://api.github.com/users/zjrunner","html_url":"https://github.com/zjrunner","followers_url":"https://api.github.com/users/zjrunner/followers","following_url":"https://api.github.com/users/zjrunner/following{/other_user}","gists_url":"https://api.github.com/users/zjrunner/gists{/gist_id}","starred_url":"https://api.github.com/users/zjrunner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zjrunner/subscriptions","organizations_url":"https://api.github.com/users/zjrunner/orgs","repos_url":"https://api.github.com/users/zjrunner/repos","events_url":"https://api.github.com/users/zjrunner/events{/privacy}","received_events_url":"https://api.github.com/users/zjrunner/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-08-29T15:14:57Z","updated_at":"2016-10-07T03:25:58Z","closed_at":"2016-10-07T03:25:58Z","body":"Hi,\r\n\r\nIf I put in GitVersion.NuGetVerisonV2 it will come up blank. If I put in GitVersion_NuGetVersionV2 it will work as expected."},"comment":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments/252144763","html_url":"https://github.com/Microsoft/vsts-tasks/issues/2354#issuecomment-252144763","issue_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2354","id":252144763,"user":{"login":"zjrunner","id":1724619,"avatar_url":"https://avatars.githubusercontent.com/u/1724619?v=3","gravatar_id":"","url":"https://api.github.com/users/zjrunner","html_url":"https://github.com/zjrunner","followers_url":"https://api.github.com/users/zjrunner/followers","following_url":"https://api.github.com/users/zjrunner/following{/other_user}","gists_url":"https://api.github.com/users/zjrunner/gists{/gist_id}","starred_url":"https://api.github.com/users/zjrunner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zjrunner/subscriptions","organizations_url":"https://api.github.com/users/zjrunner/orgs","repos_url":"https://api.github.com/users/zjrunner/repos","events_url":"https://api.github.com/users/zjrunner/events{/privacy}","received_events_url":"https://api.github.com/users/zjrunner/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T03:25:58Z","updated_at":"2016-10-07T03:25:58Z","body":"@brunobertechini - Sorry it took me so long to get to this.  In general if you define a variable with a period in it then you are going to use it in-task with an underscore instead:\r\nhttps://www.visualstudio.com/en-us/docs/build/define/variables#\r\nSo you would use GitVersion_NuGetVersionV2 if it was a variable you defined that gets expanded at task time.  When you moved to -Version $(xxx) then that was expanded by the agent itself, not the build task, so periods are maintained in that case.  \r\n\r\nSo in short, if you are filling in the EnvironmentVariable field, it is the name of the environment variable and we discover it when running the task.  If you use $(xxx) then by the time our task sees it, it is already a resolved number and not a variable at all.  We take a name explicitly so you have the option of setting and exporting variables from previous tasks.\r\n"}}
{"actor":{"display_login":"zjrunner"}}