Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Increment version numbers on aspnetcore.dll and aspnetcorerh.dll, remove unnecessary files #601

Merged
merged 5 commits into from
Feb 22, 2018

Conversation

jkotalik
Copy link
Contributor

<PropertyGroup>
<_TwoDigitYear>$([MSBuild]::Subtract($([System.DateTime]::UtcNow.Year), 2000))</_TwoDigitYear>
<_ThreeDigitDayOfYear>$([System.DateTime]::UtcNow.DayOfYear.ToString().PadLeft(3, '0'))</_ThreeDigitDayOfYear>
<AssemblyRevision>$(_TwoDigitYear)$(_ThreeDigitDayOfYear)</AssemblyRevision>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, when we produce more than one build in the same day, won't this lead to duplicate file revisions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it does. Were we okay with doing this for other dlls because we use nuget package versions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, we use this pattern elsewhere

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we use this? It means our builds are not reproducible, and that two builds with different sources will have the same revision number. Although it may not be a huge problem, it's certainly not a good thing.

Copy link
Contributor Author

@jkotalik jkotalik Feb 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is used for all of our dlls today... I am looking at the 2.0.0 installation on my computer and the file version of the dll is exactly this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other dotnet dlls have the file version matching the product version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. This is still bad for reproducible builds. But it is bad in the same way the rest of our stack computes file version, so we can just add this to the list of offenses to be cleaned up when we fix aspnet/BuildTools#452

@@ -231,13 +231,31 @@
<ClCompile Include="outofprocess\websockethandler.cxx" />
<ClCompile Include="outofprocess\winhttphelper.cxx" />
</ItemGroup>
<Target Name="CreateVersionHeader" BeforeTargets="PrepareForBuild">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this break incremental compilation? I'm not sure if this is a thing in vcsproj.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which build input variable is used in incremental build to control the build number?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@pranavkm pranavkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok to me. Get @natemcmaster's approval and make sure the licensing information is correct

<VersionHeaderContents Include="#define ProductVersionStr &quot;$(AspNetCoreModuleVersionMajor).$(AspNetCoreModuleVersionMinor).$(AspNetCoreModuleVersionPatch).$(AssemblyRevision)\0&quot;" />
<VersionHeaderContents Include="#define PlatformToolset &quot;$(PlatformToolset)\0&quot;" />
</ItemGroup>
<WriteLinesToFile File="version.h" Lines="@(VersionHeaderContents)" OverWrite="true" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding WriteOnlyWhenDifferent="True" to this. Should avoid writing it and breaking increments when the file content hasn't changed. In addition, add the file to writes

<ItemGroup>
  <FileWrites Include="version.h" />
</ItemGroup>

Prevents msbuild from cleaning up the file.

<ItemGroup>
<ProjectReference Include="..\CommonLib\CommonLib.vcxproj">
<Project>{55494e58-e061-4c4c-a0a8-837008e72f85}</Project>
</ProjectReference>
<ProjectReference Include="..\IISLib\IISLib.vcxproj">
<Project>{4787a64f-9a3e-4867-a55a-70cb4b2b2ffe}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting

VALUE "FileDescription", "IIS ASP.NET Core Module"
VALUE "FileVersion", FileVersionStr
VALUE "InternalName", "aspnetcorer.dll"
VALUE "LegalCopyright", "Copyright (C) 2016"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has @Eilon verified these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Eilon these are the same as the AspNetCoreModule values except I added "Request Handler" and changed the copyright to 2018.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc/ @shirhatti @muratg for this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this doesn't look right to me. I think it should be Copyright (c) .NET Foundation.

<PropertyGroup>
<_TwoDigitYear>$([MSBuild]::Subtract($([System.DateTime]::UtcNow.Year), 2000))</_TwoDigitYear>
<_ThreeDigitDayOfYear>$([System.DateTime]::UtcNow.DayOfYear.ToString().PadLeft(3, '0'))</_ThreeDigitDayOfYear>
<AssemblyRevision>$(_TwoDigitYear)$(_ThreeDigitDayOfYear)</AssemblyRevision>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, we use this pattern elsewhere

VALUE "CompanyName", "Microsoft"
VALUE "FileDescription", "IIS ASP.NET Core Module"
VALUE "FileVersion", FileVersionStr
VALUE "InternalName", "aspnetcorer.dll"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: aspnetcorerh.dll

VALUE "CompanyName", "Microsoft"
VALUE "FileDescription", "IIS ASP.NET Core Module"
VALUE "FileVersion", FileVersionStr
VALUE "InternalName", "aspnetcorer.dll"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong. should be aspnetcorerh.dll

BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Microsoft"
VALUE "FileDescription", "IIS ASP.NET Core Module"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need additional decription info instead of just copy asp.netcore module

@@ -231,13 +231,31 @@
<ClCompile Include="outofprocess\websockethandler.cxx" />
<ClCompile Include="outofprocess\winhttphelper.cxx" />
</ItemGroup>
<Target Name="CreateVersionHeader" BeforeTargets="PrepareForBuild">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which build input variable is used in incremental build to control the build number?

VALUE "FileDescription", "IIS ASP.NET Core Module"
VALUE "FileVersion", FileVersionStr
VALUE "InternalName", "aspnetcorer.dll"
VALUE "LegalCopyright", "Copyright (C) 2016"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this one be changed to 2018 @shirhatti

VALUE "FileDescription", "IIS ASP.NET Core Module Request Handler"
VALUE "FileVersion", FileVersionStr
VALUE "InternalName", "aspnetcorerh.dll"
VALUE "LegalCopyright", "Copyright (C) 2018"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be Copyright (c) .NET Foundation or Copyright (c) Microsoft Corporation. No date.

Copy link
Member

@Eilon Eilon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I sign off on copyright stuff. Didn't read the code/build changes.

@jkotalik jkotalik merged commit 4775706 into dev Feb 22, 2018
@jkotalik jkotalik deleted the jkotalik/version branch February 22, 2018 18:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants