{"id":3023,"date":"2007-01-06T20:43:59","date_gmt":"2007-01-06T20:43:59","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/buckh\/2007\/01\/06\/how-to-deal-with-the-y2k7-problem-file-versions-and-assemblyinfotask\/"},"modified":"2007-01-06T20:43:59","modified_gmt":"2007-01-06T20:43:59","slug":"how-to-deal-with-the-y2k7-problem-file-versions-and-assemblyinfotask","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/buckh\/how-to-deal-with-the-y2k7-problem-file-versions-and-assemblyinfotask\/","title":{"rendered":"How to deal with the Y2K7 problem &#8212; file versions and AssemblyInfoTask"},"content":{"rendered":"<p>If you use the <a href=\"http:\/\/www.gotdotnet.com\/codegallery\/codegallery.aspx?id=93d23e13-c653-4815-9e79-16107919f93e\">AssemblyInfoTask<\/a> to stamp the version numbers for your assemblies that you build with MSBuild as part of your Team Build process, you may run into the &#8220;Y2K7&#8221; problem.&nbsp; The version number is stored as a 16-bit (yes, 16 not 32) unsigned integer.&nbsp; With the format YMMDD, January 1, 2007 becomes 70101, which is 70,101 and doesn&#8217;t fit in a 16-bit integer.&nbsp; Internally, the version numbering has been reset to have a smaller number for the year.&nbsp; For the last part of 2006, builds were 1MMDD.&nbsp; Starting with 1\/1\/07, they are 2MMDD.&nbsp; Neil Enns discusses the issue in the <a href=\"http:\/\/blogs.msdn.com\/msbuild\/default.aspx\">MSBuild Team Blog<\/a> in a post titled, <a href=\"http:\/\/blogs.msdn.com\/msbuild\/archive\/2007\/01\/03\/fixing-invalid-version-number-problems-with-the-assemblyinfotask.aspx\">Fixing invalid version number problems with the AssemblyInfoTask<\/a>.&nbsp; He provides more background in the follow up post, <a href=\"http:\/\/blogs.msdn.com\/msbuild\/archive\/2007\/01\/03\/why-are-build-numbers-limited-to-65535.aspx\">Why are build numbers limited to 65535?<\/a><\/p>\n<p>tags: <a href=\"http:\/\/technorati.com\/tag\/msbuild\" rel=\"tag\">msbuild<\/a>, <a href=\"http:\/\/technorati.com\/tag\/team+build\" rel=\"tag\">team build<\/a>, <a href=\"http:\/\/technorati.com\/tag\/tfs\" rel=\"tag\">tfs<\/a>, <a href=\"http:\/\/technorati.com\/tag\/team+foundation\" rel=\"tag\">team foundation<\/a>, <a href=\"http:\/\/technorati.com\/tag\/assemblyinfotask\" rel=\"tag\">assemblyinfotask<\/a><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you use the AssemblyInfoTask to stamp the version numbers for your assemblies that you build with MSBuild as part of your Team Build process, you may run into the &#8220;Y2K7&#8221; problem.&nbsp; The version number is stored as a 16-bit (yes, 16 not 32) unsigned integer.&nbsp; With the format YMMDD, January 1, 2007 becomes 70101, [&hellip;]<\/p>\n","protected":false},"author":94,"featured_media":10268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[4,7,8],"class_list":["post-3023","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-msbuild","tag-team-build","tag-team-foundation"],"acf":[],"blog_post_summary":"<p>If you use the AssemblyInfoTask to stamp the version numbers for your assemblies that you build with MSBuild as part of your Team Build process, you may run into the &#8220;Y2K7&#8221; problem.&nbsp; The version number is stored as a 16-bit (yes, 16 not 32) unsigned integer.&nbsp; With the format YMMDD, January 1, 2007 becomes 70101, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/3023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/comments?post=3023"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/3023\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media\/10268"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media?parent=3023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/categories?post=3023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/tags?post=3023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}