Skip to content

Flow ANCM version number in the build output #9269

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

Merged
merged 3 commits into from
Apr 17, 2019

Conversation

analogrelay
Copy link
Contributor

Fixes #4016
Also fixes #7548 because I was getting build errors that told me I should update them to v142 anyway :)

This drops a file: artifacts/installers/aspnetcoremodule.version with contents like:

13.0.19101.0
[commit hash]

Still outstanding (need some assistance from @aspnet/build): working out how we could flow this forward to the final build output. This needs a little more understanding of Maestro/BAR than I have off-hand. I can add it to the manifest in Maestro.csproj but I'm not sure of how that all flows to the final output drop.

@analogrelay analogrelay requested review from jkotalik and a team April 11, 2019 04:42
@analogrelay analogrelay requested a review from Tratcher as a code owner April 11, 2019 04:42
@analogrelay analogrelay added this to the 3.0.0-preview5 milestone Apr 11, 2019
@@ -17,8 +17,6 @@
"Microsoft.VisualStudio.Component.NuGet.BuildTools",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.VC.v141.ATL",
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC there wasn't a v142 equivalent for this package. As long as things build correct, I think we are fine to remove this.

Copy link
Contributor

Choose a reason for hiding this comment

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

"Microsoft.VisualStudio.Component.VC.ATL" is the v142 equivalent, and it's listed already. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I came to the same conclusion looking at the component directory: https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2019

@@ -4,7 +4,7 @@
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildThisFileDirectory)..\</SolutionDir>
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I think I missed this one before. When you open the IIS sln now, do you get a warning about needing to upgrade to v142 still?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When you open the IIS sln now, do you get a warning about needing to upgrade to v142 still

You do not.

<Target Name="AfterBuild">
<!-- Drop a file in the artifacts directory containing the ANCM version number -->
<ItemGroup>
<VersionFileContents Include="$(AspNetCoreModuleVersionMajor).$(AspNetCoreMinorVersion).$(AssemblyBuild).$(AspNetCorePatchVersion)" />
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm going to want to verify these numbers tomorrow. I don't believe these are correct, but want to confirm before I correct you.

Copy link
Contributor

@natemcmaster natemcmaster left a comment

Choose a reason for hiding this comment

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

BAR doesn't support anything except NuGet packages right now, so there isn't really anything we can do with this file except upload it to our blob storage.

One minor tweak to make but otherwise looks fine

<!-- Drop a file in the artifacts directory containing the ANCM version number -->
<ItemGroup>
<VersionFileContents Include="$(AspNetCoreModuleVersionMajor).$(AspNetCoreMinorVersion).$(AssemblyBuild).$(AspNetCorePatchVersion)" />
<VersionFileContents Include="$(CommitHash)" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<VersionFileContents Include="$(CommitHash)" />
<VersionFileContents Include="$(SourceRevisionId)" />

CommitHash is going to be deprecated. SourceRevisionId is a well-known, built-in property in Microsoft.Common.targets available after the InitializeSourceControlInformation target . Example usage:

https://github.com/aspnet/AspNetCore/blob/78bc2a10b9ea617269527f4091903471a299e197/eng/targets/CSharp.Common.targets#L9-L17

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome, I'm glad this is in Microsoft.Common.targets now!

@analogrelay
Copy link
Contributor Author

except upload it to our blob storage.

Looking at the release pipeline, it appears that will happen automatically.

@analogrelay
Copy link
Contributor Author

Looks like there is something broken about the C++ resolution with this fix:

TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified.

@analogrelay analogrelay merged commit 01b0c88 into master Apr 17, 2019
@analogrelay analogrelay deleted the anurse/4016-flow-ancm-version branch April 17, 2019 15:09
natemcmaster added a commit that referenced this pull request Apr 17, 2019
natemcmaster added a commit that referenced this pull request Apr 17, 2019
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade IIS C++ projects to build with platformtoolset v142 (VS2019) Emit ANCM version information as part of the build
4 participants