-
Notifications
You must be signed in to change notification settings - Fork 453
Impement build props and targets #4468
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
base: feature/build-project
Are you sure you want to change the base?
Impement build props and targets #4468
Conversation
@jviau ready for a second pass! |
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile><!-- https://github.com/dotnet/runtime/issues/54684 --> | ||
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a VB project somewhere? It seems DisableImplicitNamespaceImports
is only for VB projects
"The DisableImplicitNamespaceImports property can be used to disable implicit namespace imports in Visual Basic projects that target .NET 6 or a later version. Implicit namespaces are the default namespaces that are imported globally in a Visual Basic project. Set this property to true to disable implicit namespace imports."
https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#disableimplicitnamespaceimports
|
||
<!-- When building in Azure pipelines, update the build number. --> | ||
<!-- Specifically use '$(TF_BUILD)' and not '$(CI)' to ensure we are in Azure pipelines. --> | ||
<Target Name="UpdateAzDoBuildNumber" Condition="'$(TF_BUILD)' == 'true' AND '$(UpdateBuildNumber)' == 'true'" BeforeTargets="BeforeBuild"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also need to update metadata.json script so it includes this build id as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you point me to where metadata.json is generated? Does it currently use $(Version)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We get the current release number from ADO: https://github.com/Azure/azure-functions-core-tools/blob/main/eng/scripts/artifact-assembler/generate-metadata-file.ps1#L17
Is this value saved as $env:BUILD_BUILDID as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think we need to update the parsing though for getting the out-of-proc version number since today in the script we look for $_.Name -match "^Azure\.Functions\.Cli\..*\.(\d+\.\d+\.\d+)$"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are setting BUILD_BUILDNUMBER
here, not BUILD_BUILDID
. I don't believe anything is changing for that script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated zip artifacts so we're still using the same naming convention we have today Azure.Functions.Cli
- I'll defo do an consolidated pipeline run once the feature branch is ready and we can fix anything that doesnt work
Should we update the in-proc branch to have similar targets for the versions? It might be strange if the in-proc vs default files have different names/versioning schemas but we can work with it technically (since we package everything in the consolidated pipeline). I would also just run this through the consolidated pipeline once with the official build on the feature branch just to make sure it packages everything correctly :) |
Probably a good idea to update the in-proc versioning if nothing else; I can start a feature branch with in-proc changes once we're happy with main. |
This PR implements the build props and targets that will directly replace each step in the build.csproj. Steps include:
Second this PR also brings in the same repo props, and release targets as the Host repository to keep us consistent across our repos.
Refer to https://github.com/Azure/azure-functions-host/tree/dev/eng/build for the original files
Finally, we are updating the versioning of the core tools CLI. We will still follow the model we have today for now (4.0.xxxx) - but we no longer want this version set by the CI as we need more control of the version across our many pipelines. This PR sets a new version
4.0.10000
that is higher than any version we have released today to avoid issues. We can discuss the finally version we want to land on when this feature goes into main.