{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/sdk/issues/93","repository_url":"https://api.github.com/repos/dotnet/sdk","labels_url":"https://api.github.com/repos/dotnet/sdk/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/sdk/issues/93/comments","events_url":"https://api.github.com/repos/dotnet/sdk/issues/93/events","html_url":"https://github.com/dotnet/sdk/issues/93","id":173295527,"number":93,"title":"VersionPrefix defaults to 1.0.0 regardless of whether Version actually starts with 1.0.0 or not","user":{"login":"nguerrera","id":75470,"avatar_url":"https://avatars.githubusercontent.com/u/75470?v=3","gravatar_id":"","url":"https://api.github.com/users/nguerrera","html_url":"https://github.com/nguerrera","followers_url":"https://api.github.com/users/nguerrera/followers","following_url":"https://api.github.com/users/nguerrera/following{/other_user}","gists_url":"https://api.github.com/users/nguerrera/gists{/gist_id}","starred_url":"https://api.github.com/users/nguerrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguerrera/subscriptions","organizations_url":"https://api.github.com/users/nguerrera/orgs","repos_url":"https://api.github.com/users/nguerrera/repos","events_url":"https://api.github.com/users/nguerrera/events{/privacy}","received_events_url":"https://api.github.com/users/nguerrera/received_events","type":"User","site_admin":false},"labels":[{"id":443987478,"url":"https://api.github.com/repos/dotnet/sdk/labels/Feature%20Request","name":"Feature Request","color":"ee0701","default":false}],"state":"open","locked":false,"assignee":{"login":"nguerrera","id":75470,"avatar_url":"https://avatars.githubusercontent.com/u/75470?v=3","gravatar_id":"","url":"https://api.github.com/users/nguerrera","html_url":"https://github.com/nguerrera","followers_url":"https://api.github.com/users/nguerrera/followers","following_url":"https://api.github.com/users/nguerrera/following{/other_user}","gists_url":"https://api.github.com/users/nguerrera/gists{/gist_id}","starred_url":"https://api.github.com/users/nguerrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguerrera/subscriptions","organizations_url":"https://api.github.com/users/nguerrera/orgs","repos_url":"https://api.github.com/users/nguerrera/repos","events_url":"https://api.github.com/users/nguerrera/events{/privacy}","received_events_url":"https://api.github.com/users/nguerrera/received_events","type":"User","site_admin":false},"assignees":[{"login":"nguerrera","id":75470,"avatar_url":"https://avatars.githubusercontent.com/u/75470?v=3","gravatar_id":"","url":"https://api.github.com/users/nguerrera","html_url":"https://github.com/nguerrera","followers_url":"https://api.github.com/users/nguerrera/followers","following_url":"https://api.github.com/users/nguerrera/following{/other_user}","gists_url":"https://api.github.com/users/nguerrera/gists{/gist_id}","starred_url":"https://api.github.com/users/nguerrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguerrera/subscriptions","organizations_url":"https://api.github.com/users/nguerrera/orgs","repos_url":"https://api.github.com/users/nguerrera/repos","events_url":"https://api.github.com/users/nguerrera/events{/privacy}","received_events_url":"https://api.github.com/users/nguerrera/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/sdk/milestones/1","html_url":"https://github.com/dotnet/sdk/milestones/1.0%20Preview","labels_url":"https://api.github.com/repos/dotnet/sdk/milestones/1/labels","id":2010181,"number":1,"title":"1.0 Preview","description":"","creator":{"login":"srivatsn","id":20570,"avatar_url":"https://avatars.githubusercontent.com/u/20570?v=3","gravatar_id":"","url":"https://api.github.com/users/srivatsn","html_url":"https://github.com/srivatsn","followers_url":"https://api.github.com/users/srivatsn/followers","following_url":"https://api.github.com/users/srivatsn/following{/other_user}","gists_url":"https://api.github.com/users/srivatsn/gists{/gist_id}","starred_url":"https://api.github.com/users/srivatsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srivatsn/subscriptions","organizations_url":"https://api.github.com/users/srivatsn/orgs","repos_url":"https://api.github.com/users/srivatsn/repos","events_url":"https://api.github.com/users/srivatsn/events{/privacy}","received_events_url":"https://api.github.com/users/srivatsn/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":40,"state":"open","created_at":"2016-09-16T21:38:49Z","updated_at":"2016-10-28T21:53:56Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2016-08-25T20:01:03Z","updated_at":"2016-10-31T22:26:54Z","closed_at":null,"body":"Today we have in Microsoft.NETCore.Sdk.targets (with one no-op line removed for brevity):\n\n```\n    <VersionPrefix Condition=\" '$(VersionPrefix)' == '' \">1.0.0</VersionPrefix>\n    <Version Condition=\" '$(Version)' == '' and '$(VersionSuffix)' != '' \">$(VersionPrefix)-$(VersionSuffix)</Version>\n    <Version Condition=\" '$(Version)' == '' \">$(VersionPrefix)</Version>\n```\n\nThe strange thing about this this logic is that if I, for example, set `<Version>` to 1.2.3-beta in my project, then `<VersionPrefix>` will be set to 1.0.0, but not used for anything. I worry that this will lead to incorrect dependencies on `<VersionPrefix>` always being set and meaningful.\n\nI see two possible solutions:\n\n(1) Only default `<VersionPrefix>` if we're going to use it: \n\n```\n    <VersionPrefix Condition=\"'$(Version)' == '' and '$(VersionPrefix)' == ''>1.0.0</VersionPrefix>\n    <Version Condition=\" '$(Version)' == '' and '$(VersionSuffix)' != '' \">$(VersionPrefix)-$(VersionSuffix)</Version>\n    <Version Condition=\" '$(Version)' == '' \">$(VersionPrefix)</Version>\n```\n\n(2) Eliminate `<VersionPrefix>` as a concept and just append `<VersionSuffix>` (if any) to `<Version>`:\n\n```\n    <Version Condition=\" '$(Version)' == '' \">1.0.0</Version>\n    <Version Condition=\" '$(VersionSuffix)' != ''>$(Version)-$(VersionSuffix)</Version>\n```\n\nI am leaning towards (2) because:\n- The logic is simpler to maintain and reason about. \n- I can introduce a build system that appends version information without touching projects and switching `<Version>` to `<VersionPrefix>`\n\nAnother issue: I wonder if the `-` separating parts should be hard-coded. If I want to use http://semver.org/spec/v2.0.0.html I might want to append with `+` or `.` instead. Should we just require the `-`, `.`, or `+` to be part of the suffix? I think so:\n\n```\n   <Version Condition=\" '$(VersionSuffix)' != ''>$(Version)$(VersionSuffix)</Version>\n```\n"},"comment":{"url":"https://api.github.com/repos/dotnet/sdk/issues/comments/257439129","html_url":"https://github.com/dotnet/sdk/issues/93#issuecomment-257439129","issue_url":"https://api.github.com/repos/dotnet/sdk/issues/93","id":257439129,"user":{"login":"nguerrera","id":75470,"avatar_url":"https://avatars.githubusercontent.com/u/75470?v=3","gravatar_id":"","url":"https://api.github.com/users/nguerrera","html_url":"https://github.com/nguerrera","followers_url":"https://api.github.com/users/nguerrera/followers","following_url":"https://api.github.com/users/nguerrera/following{/other_user}","gists_url":"https://api.github.com/users/nguerrera/gists{/gist_id}","starred_url":"https://api.github.com/users/nguerrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguerrera/subscriptions","organizations_url":"https://api.github.com/users/nguerrera/orgs","repos_url":"https://api.github.com/users/nguerrera/repos","events_url":"https://api.github.com/users/nguerrera/events{/privacy}","received_events_url":"https://api.github.com/users/nguerrera/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T22:26:54Z","updated_at":"2016-10-31T22:26:54Z","body":"@dsplaisted "}}
{"actor":{"display_login":"nguerrera"}}