* source-build: support building aspnetcore using non-portable runtime packages.
Currently source-build performs 'runtime-portable' build that produces 'linux-{arch}'
packages that are used when building ASP.NET Core.
With this change, we can use the non-portable packages that are produced by the
source-build 'runtime' build, and eliminate the 'runtime-portable' build.
* Invert PortableBuild checks.
* Revert name change.
- {lots of different SDK versions tried}
- Validate DataProtection custom algorithm has a constructor
- Additional fixes
- Suppress IL2121
- Fix NoWarn overrides
- Update LinkabilityChecker.csproj
- Update WasmLinkerTest.csproj
- Bump SDK version yet again
- Hack to stop using `msbuild` server
- please open an issue to keep trying to remove this
- Disable msbuild server for source-build job
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
Co-authored-by: Chris Ross <chrross@microsoft.com>
Co-authored-by: Tanay Parikh <TanayParikh@users.noreply.github.com>
Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: Sébastien Ros <sebastienros@gmail.com>
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Co-authored-by: Safia Abdalla <safia@microsoft.com>
- remove separate step to restore Interop projects
- make Interop test asset projects more "normal"
- use usual mechanism to target latest ASP.NET Core bits
- remove use of `$(BuildInteropProjects)`
- expand FunctionalTestWithAssets.targets to help w/ local testing
- still delayed and done only when necessary
- handle non-Helix testing e.g. handle `dotnet test` too
- build test assets into location `InteropTests` expects on local machine
- add FunctionalTestWithAssets.props, providing relevant defaults
- expand `FunctionalTestWithAssets` use to Identity.FunctionalTests
nits:
- rename `@(FunctionalTestAssetProjectReference)` to `@(TestAssetProjectReference)`
- cleanup leftover reference to ProjectTemplates/testassets/ in Build.props
- should have been removed in 54ff379
- remove `/p:RunTemplateTests=true`; no need to specify the default
- clean up other projects that use `$(MvcTestingTargets)`
- none need special handling for publish (don't need pages, views, or wwwroot files)
- improve build on Linux arm64
- apply changes suggested by Doug Bunting
- improve running tests on arm64
- use the currently running system's architecture instead of hard-coding x64
- skip h2spec tests on arm64 and x86
* Disable analyzers only when building in VS
* Add API annotation for ToString
* fixups
* Fix up some more warnings
* Update condition for EnforceCodeStyleInBuild
* Remove duplicate entry in PublicAPI files
* Update namespace for JSComponentConfigurationExtensions
* Remove duplicate Microsoft.AspNetCore.Components.Web.JSComponentConfigurationExtensions
* Fix license header in test file
Co-authored-by: BrennanConroy <brecon@microsoft.com>
- don't override correct values but fix incorrect ones
- fix#32615
- also get SignalR pipeline working again
nits:
- don't use `$(MSBuildProjectDirectory)` in project files
- inconsistent w/ `$(MSBuildThisFileDirectory)` and harder to grok
- don't add unnecessary slashes after `$(MSBuildThisFileDirectory)`
- clean up Microsoft.AspNetCore.Testing.props
- used only from eng/targets/CSharp.Common.props but fallback settings may help
- correct `$(RepoRoot)` fallback in Directory.Build.props
- need trailing slash almost everywhere
- pass `$(RepoRoot)` and `$(Configuration)` properties into helix.proj
- properties aren't always global and were missing when invoked from RunHelix.ps1
* Add initial support for reading content paths from file
* Add task for generating app manifest file
* Completed support for generating AppManifest.json
* Fix deserializing JSON and getting path by assembly name
* Address feedback from peer review
* Fix up target definition and formatting
* Undo typo fix
* Fix target name and JSON parsing
* Update test scenario when using app manifest
* Add new project to ProjectReferences
* Generate file before PrepareResources
* Address feedback from peer review
* Further centralize shared Fx and TFM transition workarounds
- make generated `Directory.Build.*` files more widely applicable
- warn if requested Microsoft.AspNetCore.App version does not exist in `$(DOTNET_ROOT)`
- add `$(UpdateAspNetCoreKnownFramework)` for Microsoft.AspNetCore.App `@(KnownFrameworkReference)` update
- remove central `$(BuildingTestAppsIndependently)` special case
- not needed because compiler toolset version is always available
- correct `$(KnownAppHostPackOrFrameworkReferenceTfm)` when not targeting the default TFM
- use MSBuild intrinsic functions for this and in framework projects; future-proofing
- correct `@(KnownFrameworkReference)` metadata when in servicing
- should not override default runtime and targeting pack versions
- use generated `Directory.Build.*` files in regular build
- remove now-duplicate property and item settings outside generated `Directory.Build.*` files
- use generated `Directory.Build.*` files for local Razor tests
- set `$(TargetLatestRuntimePatch)` instead of `$(RuntimeFrameworkVersion)`; simpler
- do not restore Razor SDK test asset projects until just before tests run
- depend on Microsoft.AspNetCore.App projects
- disable `$(TreatWarningsAsErrors)` for a few Razor SDK tests
- tests expect projects to build successfully despite a few warnings
- improve (widen) Microsoft.AspNetCore.App `Condition` in Blazor SDK tests
nit: do not pass `$(MicrosoftNetCompilersToolsetVersion)` into Razor test asset projects
- not needed because generated files already contain the right information
- even without that, the Directory.Build.props file imports eng/Versions.props
* Use generated `Directory.Build.*` files for local template tests
- move Infrastructure/ files to TestInfrastructure/
- Infrastructure/ sub-directories were functionally identical
- move shared parts of template test project files to PrepareForTest.targets
* Describe errors with missing generated files and the new warning in BuildFromSource.md
- address numerous Markdown lint warnings, typos, and spelling mistakes in this file
* Apply suggestions from code review
- thanks @captainsafia
* Move all troubleshooting information into BuildErrors.md
- some was already duplicated
- fix Markdown lint issues in BuildErrors.md too
* Reorder App.Runtime build slightly
- move `_InstallFrameworkIntoLocalDotNet` earlier because other builds depend on this part
- this target sometimes executes after dependent projects continue
- add `DependsOnTargets` attributes to further constrain ordering
nit: `IncludeFrameworkListFile` should run before `_ResolveSharedFrameworkContent`
* Add temporary workaround for `[AssemblyVersion]` changes
* Address @wtgodbe's nit from #27653
- https://github.com/dotnet/aspnetcore/pull/27653#pullrequestreview-529368502
Co-authored-by: Safia Abdalla <safia@microsoft.com>
* Move all PublicAPI.Unshipped.txt files to PublicAPI.Shipped.txt
- we have now shipped this API surface
* Add eng/PublicAPI.empty.txt file
- make it easier to add new implementation projects
* Add missing public API baseline files
- #26784 part 1/2
- a few unexpected files turned up missing beyond the #26784 list…
* Reference Microsoft.CodeAnalysis.PublicApiAnalyzers more often
- #27484 part 2/2
- emit errors when API baseline files are missing
- update categorization of some projects
- specification tests are not implementation projects
- but _were_ project reference providers (keep that)
- correct `$(IsTestAssetProject)` setting for Razor shims et cetera
- correct `$(IsSampleProject)` setting for casing of some Sample directories
- Microsoft.AspNetCore.Analyzer.Testing should be treated as test asset
- add `$(AddPublicApiAnalyzers)` property to support overrides
- e.g. for `msbuild` task projects and tools
nit:
- remove useless `$(IsTestProject)` setting in a specification test project
- wrap some long `Condition`s
* Do not run public API analyzer in `RazorCoreCompile` target
* Remove old `$(EnableApiCheck)` settings
- property does nothing
- also remove a dangling ApiCheck comment
* Add initial support for Apple Silicon
- Add osx-arm64 runtime dependency
- Add osx-arm64 to supported rid identifiers
- Update vmImage to macOS-10.15
- Use XCode 12.2 for all macOS builds
- Add build and sign macos arm64 to CI scripts
This should build aspnetcore for osx-arm64, however
the native dependencies libuv and libe_sqlite3 will
need to be updated to have full functionality. These
are provided by separate repos.
Enabling at this point unblocks effort to create the initial
osx-arm64 SDK.
* PR Feedback
* Update branding to 6.0.0 Alpha1
- hold the TFM back at `net5.0`
- correct `TargetFrameworkVersion` in FrameworkList.xml; don't use `$(AspNetCoreMajorMinorVersion)`
- move `$(DefaultNetCoreTargetFramework)` to eng/Versions.props
- avoid repeating value in AfterSolutionBuild.targets and Directory.Build.props files
- add new versions to `TemplatePackageInstaller`
- update project template test scripts
* Update / add 6.0 package versions in test expectations
- basically, remove test assumptions that branding == target TFM
- `TestData` will need another update once 6.0.0.0 assembly versions arrive from dotnet/runtime
* Update `Condition`s on `@(SuppressBaselineReference)` items to 6.0
* Undo some of #24816
- allow sharedFx assemblies in Microsoft.AspNetCore.Components.WebAssembly.DevServer package
- see #26448 about reducing this baggage later in 6.0
* Skip IndividualAuth tests on Helix
- #26776
- include all shipping packages in Helix payloads that need runtime
- remove hard-coded `-ci` that broke Helix tests with stable versions or local builds
- for local builds, do not assume `$(Configuration)` is Release
- support `$(HelixTargetQueues)` property used in RunHelix.ps1
- lost somewhere along the lines; script ran full matrix
nits:
- clean up redundant addition of runtime and ref/ packages
- `@(HelixContent)` additions in `_CreateHelixWorkItem` target are ignored
- mention '+' separation of `-HelixQueues` argument to RunHelix.ps1
- allow `$(IsUnitTestProject)` override in case we need it in the future
- handle differing SiteExtensions package versions
- the arch-specific packages don't stabilize when final package does
- update 3.1 packages in bundle to 3.1.7 version
- remove useless empty folder from LoggingBranch (arch-specific) package
- double slashes help nobody but add an empty-named level in the package
nit: fix a binary log filename
* Add net461 TFM to netstandard2.0 projects
* Fix a couple of errors
* Fix some errors
* Get rid of Sockets reference
* Respond to feedback
* net461 -> property
* Fixup clientSample
* Remove net461 from analyzers/razor
* Remove net461 from test projects
* Feedback
* Add net461 test configs
* Remove some incompatible test configs
* Fix test
* Remove Internal.AspNetCore.Analyzers
This resolves build flakiness caused by referencing the analyzer:
```
2020-08-07T21:22:39.1149296Z ##[error].dotnet\sdk\5.0.100-rc.1.20379.10\Microsoft.Common.CurrentVersion.targets(4188,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build)
Could not copy "F:\workspace\_work\1\s\artifacts\obj\Internal.AspNetCore.Analyzers\Release\netstandard1.3\Internal.AspNetCore.Analyzers.dll"
to "F:\workspace\_work\1\s\artifacts\bin\Internal.AspNetCore.Analyzers\Release\netstandard1.3\Internal.AspNetCore.Analyzers.dll". Beginning retry 1 in 1000ms.
The process cannot access the file 'F:\workspace\_work\1\s\artifacts\bin\Internal.AspNetCore.Analyzers\Release\netstandard1.3\Internal.AspNetCore.Analyzers.dll' because it is being used by another process.
```
The analyzer checks if pubternal types are being exposed in public APIs. We no longer author pubternal types, so this is no longer a concern.
* Remove DisablePubternalApiCheck
* Simplify ref/ assembly generation
- followup 1/2 for 5266918ed2
- correct the Razor.Tools project
- `%(Reference.Version)` metadata does not bleed through into `@(PackageReference)` items
- much more work to do so than to add this special case
- remove `$(Razor_NewtonsoftJsonPackageVersion)`
- remove RTMVersions project and use RepoTasks instead
- make it an error if RepoTasks is not restored before anything else builds
- add items and properties for System.Security.AccessControl
nits:
- remove invalid (ignored) metadata in Directory.Build.props and AzureAppServices.SiteExtension project
- improve / extend a couple of comments
- move `@(Reference)` items together in Microsoft.AspNetCore.Razor.Tools
* Remove all ref/ projects
* Remove GenAPI infrastructure
* Remove notion of a reference assembly project
- remove `$(IsReferenceAssemblyProject)`, `$(ReferenceReferenceAssemblies)` and `$(ReferenceImplementationAssemblies)`
- remove unnecessary `$(NoWarn)` settings
nits:
- remove a few misleading comments
- wrap some long lines
* Move .0 package version workaround into Versions.props
- touch up SharedFramework.External.props
* Expose `%(LatestPackageReference.RTMVersion)` metadata
- automate use of properties in the `@(LatestPackageReference)` item group to make this maintainable
- add a couple of special cases at the bottom of eng/Dependencies.props
- add one more `$(...PackageVersion)` property to avoid yet-another special case
* Enable Roslyn reference assemblies
- exclude ref/ assembly from packages other than targeting pack
- update Microsoft.AspNetCore.App.Ref.csproj
- `%(IsReferenceAssembly)` and `%(ReferenceGrouping)` metadata no longer relevant
- only ref/ assemblies are in `@(ReferencePathWithRefAssemblies)` item group
nits:
- remove now-unnecessary workaround
- issues with TFM transition are behind us
- clean up Microsoft.AspNetCore.App.Runtime.csproj slightly
- use `GeneratePathProperty="true"`
- reorder item / property settings for meta-expansion
- correct spelling errors and phrasing in comments
* Update documentation to reflect recent changes
- remove CrossRepoBreakingChanges.md; was tied to old TeamCity infrastructure
- also much less relevant given repo merges
- adjust details and examples in ReferenceResolution.md
- reflect repo merges, Dependencies.props changes, and current Maestro++ channels
- add a few more details e.g. specific files where Version.Details.xml versions are used
* !fixup! Remove another irrelevant doc file
* !fixup! Address PR review suggestions
- convert a couple of warnings to errors
- use consistent casing for Microsoft.NETCore.App.Runtime.* packages
- reduce `%(LatestPackageReference.Version)` metadata special cases
- add and improve comments e.g.
- improve comments about `$(*V0PackageVersion)` properties
- improve placement of comments about item removal in ResolveReferences.targets
- confirmed `$(*V0PackageVersion)` property list is complete
nits:
- fix solution example in ReferenceResolution.md
- remove item group definition for `@(LatestPackageReference)`
- remove `%(LatestPackageReference.VersionName)` metadata after use; large item group
- similarly, remove `%(LatestPackageReference.RTMVersion)` when not needed; just complicates `Condition`s
When I squash, I must remember this fixes
- #14801
- dotnet/aspnetcore-internal#2693
* Actually use `%(LatestPackageReference.RTMVersion)` metadata
- gather RTM package references in a new project
- a (very) separate project to work around package conflict resolution
- empty `Test` target works around Arcade's testing approach
- new target in ResolveReferences.targets updates relevant assembly paths to use the RTM packages
- done as soon as possible after `ResolvePackageAssets` determines the paths
- done for all compilation inputs, not just ref/ assemblies
* Enable `/warnAsError` in Windows builds
- already enabled in non-Windows builds because override existed only in build.ps1
* Allow some warnings related to closed issues
- common `<NoWarn>$(NoWarn);CS1591</NoWarn>` case unchanged
- /Directory.Build.props ensures that warning remains a warning but doesn't hide it
* !fixup! Root build.sh _does_ disable warnings as errors
- variable eng/common/tools.sh uses named `warn_as_error`
* Build time changes
A few changes for build time
- Don't build tests with SkipTestBuild=true and use that for official
build legs. This cuts 40%-50% off the msbuild invocations for build.
The longest build leg drops by about 30 mins.
- Skip logging of some task parameters and their metadata.
This reduces overall binlog size, which is a major contributor to
build time.
Unfortunately, this does not mean we can yet turn binlogs back on. This
change can actually increase the overall binlog size due to logging of
more project started arguments. There is another optimization for this
in progress.
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
* Make `dotnet msbuild` the default on Windows too
- add step using desktop `msbuild` when native builds may be involved
- `-All` (without `-NoBuildNative`), `-BuildNative` or `-BuildInstallers` run this step
- but `-ForceCoreMsbuild` unconditionally skips this step
nits:
- add binary log for RepoTasks build if `$BinaryLog` (echoes the `dotnet msbuild` command)
- add blank lines between build steps
* Enable building managed projects depending on native assets
- splitting native builds out confuses these projects
- use `$(BuildNative)` less, only to control actual building (not bundling)
- build both native platforms in one `msbuild` invocation
* Adjust generation scripts to explicitly choose the MSBuild engine
- ensure native assets are included in GenerateReferenceAssemblies.ps1 build
- clean up the global state that tools.ps1 corrupts
* Revert move to VS2019.Pre queues
This reverts part of commit b67d161e03
- was "[release/5.0-preview5] Update dependencies from dotnet/aspnetcore-tooling (#21710)"
* Revert "!temporary! Require `msbuild` from VS2019 16.6"
- this reverts commit 58cf2304a6
* Reduce build duplication in pipelines
- build native assets and repo tasks once per CI job
- only cleanup framework references after packing managed projects
nits:
- wrap a few long lines
- remove extra `-forceCoreMsbuild` options in SiteExtensions' build.cmd
* Fix Helix jobs
- restore.cmd doesn't work well with `-projects`; script unconditionally adds `-all`
* !fixup! Reduce duplications further
- missed a couple of places `-noBuildRepoTasks` helps
* Cleanup: Remove a few dangling binary logs
* !fixup! Correct typos in generation scripts
* !fixup! Another typo in the generation scripts