Azure / Azure/azure-functions-host
Engineering modernization
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
# Overview
To improve developer quality of life and bring our repository up to date with the latest .NET tooling, we will be investing in modernizing our engineering and repository.
We initially discussed and proposed doing this for dotnet worker repository but have shifted to do host repo first. The dotnet worker proposal and example can be found [here](https://github.com/jviau/dotnet-worker-layout/blob/main/Overview.md). We will be adopting most of that proposal but fine-tuning it for what is appropriate for the host (and based on feedback).
# Goal
1. All modern .NET features enabled/supported (without changing target framework)
2. Developers do not need any tools or scripts outside of `dotnet` SDK.
3. Local builds as closely mimic CI builds _by default_
# Layout
Below is the proposed layout.
```
|- doc
|- schema/
|- eng/ # All build and development time related code and tools go here.
|- ci/
|- tools/
|- targets/
|- sample/
|- out/ # All output goes here. Allows for a simple one-folder delete to clean all output.
|- bin/
|- obj/
|- pkg/ # from dotnet pack
|- pub/ # from dotnet publish
|- src/ # All production / shipping code must go under src
|- Script/
|- Script.csproj
|- Abstractions/
|- Script.Abstractions.csproj
|- Analyzers/
|- Script.Analyzers.csproj
|- ExtensionsMetadataGenerator
|- Script.ExtensionsMetadataGenerator.csproj
|- Grpc/
|- Script.Grpc.csproj
|- WebHost/
|- Script.WebHost.csproj
|- test/
|- Abstractions.Tests/
|- Analyzers.Tests/
|- Benchmarks/
|- Helpers/
|- Functional.Tests/
|- Grpc.Tests/
|- Integration.Tests/
|- Script.Tests/
|- WebHost.Tests/
|- Resources/
|- Projects/
|- EmptyScriptRoot/
|- TestsFunctions/
|- DotNetIsolated.UnsupportedWorker/
|- DotNetIsolated/
|- AssemblyLoadContextRace/
|- Dependency56/
|- DependencyA/
|- MultipleDependencyVersions/
|- NativeDependencyNoRuntimes/
|- ReferenceOlderRuntimeAssembly/
|- WebJobsStartupTests/
```
```[tasklist]
### Tasks
- [x] Use .NET8 Sdk (#9825)
- [ ] Use .NET8 common artifacts output
- [ ] Update versioning approach (release: `{Major}.{Minor}.{Patch}(-preview.{PreviewCount})?`. ci/pr/local: `{Major}.{Minor}.{Patch}-{BuildReason}.{yymmdd}.{Counter}`)
- [ ] Restructure repository -> 1 to 1 csproj to unit test csproj.
- [ ] Replace CI powershell scripts with msbuild targets
- [ ] Add shims to enable support for modern C# features in older TFMs
- [ ] Enable, tune, and fix .NET analyzers
- [ ] Remove stylecop (replaced by .NET analyzers)'
```
Contributor guide
Assessment
This issue has not been assessed yet.