* Reuse model binders
Reuse the same model binders for CancellationTokens and services, rather than allocating a new one for every request with such a parameter.
* Update async Dispose and methods references
- `Dispose` can be changed to `DisposeAsync`
- The methods in the following code snippet are not available, it causes duplicate references
```
/// <summary>
/// <see cref="HelperResult.WriteTo(TextWriter)"/> is invoked
/// </summary>
/// <param name="result">The <see cref="HelperResult"/> to invoke</param>
protected void Write(HelperResult result)
{
Write(result);
}
```
* Update BaseView.cs
* 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>
Validation attributes such as a CompareAttribute require a container to be configured in ValidationContext. This change
configures uses the controller or page handler instance that the property is being bound on when binding top-level properties.
Fixes https://github.com/dotnet/aspnetcore/issues/4895
* Remove extra `[SkipOnHelix]` attribute
- only need the one compiled into Microsoft.AspNetCore.Testing
- update the documentation to reflect this
- nit: address Markdown warnings that VS Code showed
* Add `SuccessfulTests` to ensure something runs in every non-Helix runs
- #22241
- cleans up hundreds of warnings but leaves a couple for the Blazor tests assembly
- see comments about xUnit runner command line in the new class
* 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
* Undo overzealous merge choices
* Undo temporary changes applied when part of the repo was building in the blazor-wasm branch
* Skip SPA template tests in 3.1
* Update dependencies from https://github.com/dotnet/aspnetcore-tooling build 20200521.1
Microsoft.AspNetCore.Mvc.Razor.Extensions , Microsoft.AspNetCore.Razor.Language , Microsoft.CodeAnalysis.Razor , Microsoft.NET.Sdk.Razor
From Version 5.0.0-preview.6.20270.11 -> To Version 5.0.0-preview.6.20271.1
Dependency coherency updates
Microsoft.Extensions.Caching.Abstractions,Microsoft.Extensions.Caching.Memory,Microsoft.Extensions.Configuration.Abstractions,Microsoft.Extensions.Configuration.Binder,Microsoft.Extensions.Configuration.CommandLine,Microsoft.Extensions.Configuration.EnvironmentVariables,Microsoft.Extensions.Configuration.FileExtensions,Microsoft.Extensions.Configuration.Ini,Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.Configuration.UserSecrets,Microsoft.Extensions.Configuration.Xml,Microsoft.Extensions.Configuration,Microsoft.Extensions.DependencyInjection.Abstractions,Microsoft.Extensions.DependencyInjection,Microsoft.Extensions.FileProviders.Abstractions,Microsoft.Extensions.FileProviders.Composite,Microsoft.Extensions.FileProviders.Physical,Microsoft.Extensions.FileSystemGlobbing,Microsoft.Extensions.Hosting.Abstractions,Microsoft.Extensions.Hosting,Microsoft.Extensions.Http,Microsoft.Extensions.Logging.Abstractions,Microsoft.Extensions.Logging.Configuration,Microsoft.Extensions.Logging.Console,Microsoft.Extensions.Logging.Debug,Microsoft.Extensions.Logging.EventSource,Microsoft.Extensions.Logging.EventLog,Microsoft.Extensions.Logging.TraceSource,Microsoft.Extensions.Logging,Microsoft.Extensions.Options.ConfigurationExtensions,Microsoft.Extensions.Options.DataAnnotations,Microsoft.Extensions.Options,Microsoft.Extensions.Primitives,Microsoft.Extensions.Internal.Transport,Microsoft.Win32.Registry,Microsoft.Win32.SystemEvents,System.ComponentModel.Annotations,System.Diagnostics.EventLog,System.Drawing.Common,System.IO.Pipelines,System.Net.Http.WinHttpHandler,System.Net.WebSockets.WebSocketProtocol,System.Reflection.Metadata,System.Runtime.CompilerServices.Unsafe,System.Security.Cryptography.Cng,System.Security.Cryptography.Pkcs,System.Security.Cryptography.Xml,System.Security.Permissions,System.Security.Principal.Windows,System.ServiceProcess.ServiceController,System.Text.Encodings.Web,System.Text.Json,System.Threading.Channels,System.Windows.Extensions,Microsoft.Extensions.DependencyModel,Microsoft.NETCore.App.Ref,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Internal,Microsoft.NETCore.Platforms
From Version 5.0.0-preview.6.20264.1 -> To Version 5.0.0-preview.6.20270.12 (parent: Microsoft.AspNetCore.Razor.Language
* React to changes
* Update dependencies from https://github.com/dotnet/aspnetcore-tooling build 20200521.3
Microsoft.AspNetCore.Mvc.Razor.Extensions , Microsoft.AspNetCore.Razor.Language , Microsoft.CodeAnalysis.Razor , Microsoft.NET.Sdk.Razor
From Version 5.0.0-preview.6.20270.11 -> To Version 5.0.0-preview.6.20271.3
Dependency coherency updates
Microsoft.Extensions.Caching.Abstractions,Microsoft.Extensions.Caching.Memory,Microsoft.Extensions.Configuration.Abstractions,Microsoft.Extensions.Configuration.Binder,Microsoft.Extensions.Configuration.CommandLine,Microsoft.Extensions.Configuration.EnvironmentVariables,Microsoft.Extensions.Configuration.FileExtensions,Microsoft.Extensions.Configuration.Ini,Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.Configuration.UserSecrets,Microsoft.Extensions.Configuration.Xml,Microsoft.Extensions.Configuration,Microsoft.Extensions.DependencyInjection.Abstractions,Microsoft.Extensions.DependencyInjection,Microsoft.Extensions.FileProviders.Abstractions,Microsoft.Extensions.FileProviders.Composite,Microsoft.Extensions.FileProviders.Physical,Microsoft.Extensions.FileSystemGlobbing,Microsoft.Extensions.Hosting.Abstractions,Microsoft.Extensions.Hosting,Microsoft.Extensions.Http,Microsoft.Extensions.Logging.Abstractions,Microsoft.Extensions.Logging.Configuration,Microsoft.Extensions.Logging.Console,Microsoft.Extensions.Logging.Debug,Microsoft.Extensions.Logging.EventSource,Microsoft.Extensions.Logging.EventLog,Microsoft.Extensions.Logging.TraceSource,Microsoft.Extensions.Logging,Microsoft.Extensions.Options.ConfigurationExtensions,Microsoft.Extensions.Options.DataAnnotations,Microsoft.Extensions.Options,Microsoft.Extensions.Primitives,Microsoft.Extensions.Internal.Transport,Microsoft.Win32.Registry,Microsoft.Win32.SystemEvents,System.ComponentModel.Annotations,System.Diagnostics.EventLog,System.Drawing.Common,System.IO.Pipelines,System.Net.Http.WinHttpHandler,System.Net.WebSockets.WebSocketProtocol,System.Reflection.Metadata,System.Runtime.CompilerServices.Unsafe,System.Security.Cryptography.Cng,System.Security.Cryptography.Pkcs,System.Security.Cryptography.Xml,System.Security.Permissions,System.Security.Principal.Windows,System.ServiceProcess.ServiceController,System.Text.Encodings.Web,System.Text.Json,System.Threading.Channels,System.Windows.Extensions,Microsoft.Extensions.DependencyModel,Microsoft.NETCore.App.Ref,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Internal,Microsoft.NETCore.Platforms
From Version 5.0.0-preview.6.20264.1 -> To Version 5.0.0-preview.6.20270.12 (parent: Microsoft.AspNetCore.Razor.Language
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
This pull request updates the following dependencies
[marker]: <> (Begin:e908e90a-0c22-4c54-b254-08d79557a113)
## From https://github.com/dotnet/efcore
- **Subscription**: e908e90a-0c22-4c54-b254-08d79557a113
- **Build**: 20200520.1
- **Date Produced**: 5/20/2020 5:36 PM
- **Commit**: 85b57af827aa71b77d673e813e046d081c8027ed
- **Branch**: refs/heads/internal/release/3.1
- **Updates**:
- **Microsoft.EntityFrameworkCore.Tools**: from 3.1.4 to 3.1.5
- **Microsoft.EntityFrameworkCore.InMemory**: from 3.1.4 to 3.1.5
- **Microsoft.EntityFrameworkCore**: from 3.1.4 to 3.1.5
- **Microsoft.EntityFrameworkCore.Relational**: from 3.1.4 to 3.1.5
- **Microsoft.EntityFrameworkCore.Sqlite**: from 3.1.4 to 3.1.5
- **dotnet-ef**: from 3.1.4 to 3.1.5
- **Microsoft.EntityFrameworkCore.SqlServer**: from 3.1.4 to 3.1.5
[marker]: <> (End:e908e90a-0c22-4c54-b254-08d79557a113)
* Clean up logs for Negotiate Authentication and Authorization
* Add missing arg in NegotiateLoggingExtensions.cs
* Adjust formatting
* Remaining text changes
* Update src/Security/Authentication/Negotiate/src/Internal/NegotiateLoggingExtensions.cs
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* Update src/Security/Authentication/Negotiate/src/Internal/NegotiateLoggingExtensions.cs
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* Update src/Security/Authentication/Negotiate/src/NegotiateHandler.cs
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* Update src/Security/Authentication/Negotiate/src/Internal/NegotiateLoggingExtensions.cs
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* Apply changes to feedback committed
* Update logger call to refactored name
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
Co-authored-by: Giuseppe Campanelli <campanelli_g@yahoo.com>
* Update dependencies from https://github.com/dotnet/arcade build 20200511.9
- Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
- Microsoft.DotNet.GenAPI: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
- Microsoft.DotNet.Helix.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
* Pre-emptively take -nobl change
* Disable binlogs in CI
* Fix build.sh to know about -nobl
* Align build.ps1|sh with latest Arcade parameters
- do not enable binary logs by default in CI builds
- leave `-binaryLog` and `-excludeCIBinaryLog` handling to eng/common/tools.ps1|sh
- was unnecessary since `-bl /bl:{some name}` worked fine, ignoring OOMs
nit: document `-excludeCIBinarylog` a bit more
* Do not pass unknown options into CodeCheck.ps1
* Pass `-ci -nobl` into remaining CI build jobs
* Switch default TFM to `net5.0`
* Update missing project templates tfms
* Add more `-ci -nobl`
- needed because _all_ builds in the pipeline are implicitly CI builds
- default-build.yml adds `-ci` when script wasn't explicit
* Default templates to net5.0
* PR feedback
* Update TFMs in explicit .nuspec files
* Update TFMs in test projects
* Update TFMs in test C# code
* Update TFMs in infrastructure files
* Future-proof a check for `net5.0` or later
- avoid comparisons involving `$(TargetFramework)` in .targets files
- fine to compare it with `''` or `$(DefaultNetCoreTargetFramework)`
* !fixup! Undo a couple of earlier fixes
- remove a duplicate `$()` setting
- correct the one remaining versioned `#if` define
- did not make it `#if NETCOREAPP` because benchmarks test numerous .NET Core TFMs
* Disable binary logs in CodeCheck.ps1
* Specify `-ci -nobl` just once when using `parameters.buildArgs`
* Restore `$binaryLog` default logic
This cherry-picks most of d5849f3534 into this branch
- [master] Update dependencies from dotnet/arcade dotnet/aspnetcore-tooling (#21630)
- does not include dotnet/aspnetcore-tooling updates
Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Will Godbe <wigodbe@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
* Update dependencies from https://github.com/dotnet/arcade build 20200511.9
- Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
- Microsoft.DotNet.GenAPI: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
- Microsoft.DotNet.Helix.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
* Update dependencies from https://github.com/dotnet/aspnetcore-tooling build 20200514.6
Microsoft.AspNetCore.Mvc.Razor.Extensions , Microsoft.AspNetCore.Razor.Language , Microsoft.CodeAnalysis.Razor , Microsoft.NET.Sdk.Razor
From Version 5.0.0-preview.5.20261.4 -> To Version 5.0.0-preview.6.20264.6
* Pre-emptively take -nobl change
* Disable binlogs in CI
* Fix build.sh to know about -nobl
* Align build.ps1|sh with latest Arcade parameters
- do not enable binary logs by default in CI builds
- leave `-binaryLog` and `-excludeCIBinaryLog` handling to eng/common/tools.ps1|sh
- was unnecessary since `-bl /bl:{some name}` worked fine, ignoring OOMs
nit: document `-excludeCIBinarylog` a bit more
* Do not pass unknown options into CodeCheck.ps1
* Pass `-ci -nobl` into remaining CI build jobs
* Switch default TFM to `net5.0`
* Update missing project templates tfms
* Add more `-ci -nobl`
- needed because _all_ builds in the pipeline are implicitly CI builds
- default-build.yml adds `-ci` when script wasn't explicit
* Default templates to net5.0
* PR feedback
* Update TFMs in explicit .nuspec files
* Update TFMs in test projects
* Update TFMs in test C# code
* Update TFMs in infrastructure files
* Future-proof a check for `net5.0` or later
- avoid comparisons involving `$(TargetFramework)` in .targets files
- fine to compare it with `''` or `$(DefaultNetCoreTargetFramework)`
* !fixup! Undo a couple of earlier fixes
- remove a duplicate `$()` setting
- correct the one remaining versioned `#if` define
- did not make it `#if NETCOREAPP` because benchmarks test numerous .NET Core TFMs
* Disable binary logs in CodeCheck.ps1
* Specify `-ci -nobl` just once when using `parameters.buildArgs`
* Restore `$binaryLog` default logic
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Co-authored-by: Will Godbe <wigodbe@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
* Previous optimization didn't help as much as intended.
By specifying a method group as the arguments to method like ReadWhile, an allocation was still occurring. Instead, cache the Func as a member in the class and use it instead of the method group.\n\nCommit migrated from 2e6aa150bc
* Change template test build and publish to not perform dotnet restore
* Remove locking requirements for build and publish
* Increase timeout for dotnet new operations since it's network bound
* Improve build reliability
- ensure `ResolveCustomReferences` target executes before packages are used
- `ResolveAssemblyReferences` and `ResolveAssemblyReferencesDesignTime` targets run too late
- e.g. failed builds of Microsoft.AspNetCore.WebUtilities or Microsoft.AspNetCore.Hosting when building from root
- add `GetReferenceProjectTargetPathMetadata` for ease of use as well as reliability
- avoids extra work to get existing metadata (ref/ projects execute no tasks in this target)
nit: rename `@(ReferenceProjectMetadata)` -> `@(ReferenceProjectTargetPathMetadata)`
* Ensure `GetTargetPathMetadata` target runs with `$(TargetFramework)` set
- ref/ projects all multi-target and otherwise no-op this target
* Revert "Fix various "Type or namespace not found" errors (#20736)"
- change is no longer needed with other fixes in this PR
This reverts commit 8218d6e0e7.
* Fix use of precedence in endpoint routing DFA
Fixes: #18677Fixes: #16579
This is a change to how sorting is use when building endpoint routing's graph of
nodes that is eventually transformed into the route table. There were
bugs in how this was done that made it incompatible in some niche
scenarios both with previous implementations and how we describe the
features in the abstract.
There are a wide array of cases that might have been impacted by this
bug because routing is a pattern language. Generally the bugs will involve a
catch-all, and some something that changes ordering of templates.
Issue #18677 has the simplest repro for this, the following templates
would not behave as expected:
```
a/{*b}
{a}/{b}
```
One would expect any URL Path starting with `/a` to match the first
route, but that's not what happens.
---
The change supports an opt-in via the following AppContext switch:
```
Microsoft.AspNetCore.Routing.UseCorrectCatchAllBehavior
```
Set to true to enable the correct behavior.
---
The root cause of this bug was an issue in how the algorithm used to be
build the DFA was designed. Specifically that it uses a BFS to build the
graph, and it uses an up-front one-time sort of endpoints in order to
drive that BFS.
The building of the graph has the expectation that at each level, we
will process **all** literal segments (`/a`) and then **all** parameter
segments (`/{a}`) and then **all** catch-all segments (`/{*a}`). Routing
defines a concept called *precedence* that defines the *conceptual*
order in while segments types are ordered.
So there are two problems:
- We sort based on criteria other than precedence (#16579)
- We can't rely on a one-time sort, it needs to be done at each level
(#18677)
---
The fix is to repeat the sort operation at each level and use precedence
as the only key for sorting (as dictated by the graph building algo).
We do a sort of the matches of each node *after* building the
precedence-based part of the DFA, based on the full sorting criteria, to
maintain compatibility.
* Add test
* Added some kestrel event counters
- Connection queue length - This is the amount of connections accepted and queued in the thread pool.
- Connection count - The number of connections
- Total connections - The total number of connections ever connected.
- Connection Rate - Connections per second
* Added TLS counters
- Current TLS handshakes
- Total TLS handshakes
- Failed TLS handshakes
- TLS handshake per second
* Added HTTP/2 queue length counter
* Improve the event information
- Add TLS version to handshake events
- Add HTTP version to request queue events
- Renamed HTTP/2 request queue length to http request queue
Contributes to #4769
ServerComponentRenderingTest.CanDispatchAsyncWorkToSyncContext is quarantined but since it's not running on Helix there isn't any history available for it. With all the moving
parts in the server test, it's unclear if it's a product vs test setup issue.
Authoring a more simplified test so we can track test history. Note that it's starting off as quarantined because there's no evidence that the product code isn't broken
Fixes https://github.com/dotnet/aspnetcore/issues/19413
* Improve CSharpLanguageCharacteristics.MapKeyword performance
The razor typing perf test profile I'm looking at has 156 ms of CPU cycles spent in this method, mostly in Enum.ToString()
\n\nCommit migrated from e821a4642e
* Add a scenario for measuring navigating between components
* Apply suggestions from code review
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
In the razor perf typing test, Accept was showing 27 ms allocating enumerators. Additionally, modified ReadWhile to only allocate if it would return a non-empty collection (and to not use the complexity introduced by using yield enumerators)\n\nCommit migrated from 27a14af36a
The razor perf test shows about 70 ms CPU of WithSpanContext is in allocation. GetAnnotation similarly is showing about 60 ms in allocation (of which this only partly improves)\n\nCommit migrated from a060f129ff
Our razor typing test measured 153 CPU ms in this method. Optimized by fewer calls to CurrentCharacter, not checking '<' twice, and uswing a switch stmt.\n\nCommit migrated from c601c2f11e
* Several changes targeted to improving perf of RazorSyntaxTree.Parse
1) Modify ParserHelpers.IsNewLine to use a switch instead of Array.IndexOf
2) Modify Tokenizer.CreateToken to take in an array of RazorDiagnostics rather than an IReadOnlyList as that was causing a ToArray call on an empty diagnostics very often (during a SyntaxFactory.Token call)
3) Modify TokenizerBackedParser.Putback to allow an IReadOnlyList as a parameter to not require creation of a reverse enumerator.
4) Cut down allocations in HtmlMarkupParser.GetParserState by:
a) Using an IReadOnlyList instead of IEnumerable to get rid of the allocations from the .any calls
b) Don't allocate while reading initial spacing
c) Inline the IsSpacingToken code so cut down on code executed and need to allocate a separate Func
5) Modify CSharpCodeParser.IsSpacingToken to now be a set of methods instead of a single method that allocates a Func. This is a very high traffic method.
6) Implement a fairly rudimentary Whitespace token cache, as they can be reused. This was based off Roslyn's SyntaxNodeCache, but simplified significantly. It's probably worth investigating whether you should more fully embrance token caching outside of whitespace.
* PR feedback and added one more optimization in LocateOwner that's been bugging me for years. Assuming all chidlren are contained within a nodes span, we can short-circuit the DFS this code was doing significantly cutting time in this method which is important as it's exercised on the main thread during typing.
* missed a space
* StringTextToSnapshot's switch to IsNewLine needed to use start as the index to begin the search, not zero.\n\nCommit migrated from 45411f7526
* Use a dedicated thread for timers in rather than a Timer
- This make it possible to still timeout various operations when there's thread pool starvation occurring.
- Print heartbeat slow if duration > interval
I noticed several hundred ms spent in this method from a customer profile. Primarilly, the method was doing a linear scan of all lines trying to find one that contained the requested position. I changed this to a binary search, but kept/improved the optimization around checking next/previous lines before instigating the search.
Note, there was also a bug where the old code did:
else if (absoluteIndex > _currentLine.Index && _currentLine.Index + 1 < _lines.Count)
but it should have been coparing absoluteIndex with _currentLine.Start
\n\nCommit migrated from 32a0f28708
* Tries to increase the reliability of the tests by:
* Trying to ensure that the server is up and running before connecting.
* Retrying a connection attempt multiple times.
* Update SDK to preview.5.20251.2
- includes support for the `net5.0` TFM
- includes fix for `$(PublishDepsFilePath)`
- includes fix for incorrect NU5118 warnings when `'$(PackAsTool)' == 'true'`
* !!temporary!! Suppress NU5129 warnings
- build/ and buildTransitive/ naming conventions do not treat TFMs as equivalent
* Run `InjectRequestHandlerOnPublish` later
- late enough for .deps file to exist i.e. after the `CopyFilesToPublishDirectory` target
- `AfterTargets` is a bit flaky; use `BeforeTargets` with empty targets instead
* Always add `@(AssemblyAttribute)` items before they are processed
- use `BeforeTargets="GetAssemblyAttributes"` for consistently throughout the repo
* Move template specific helpers out of shared and into templates
* More debug info, fix casing issues
* Keep test skipped
* Undo lock changes
* Standarize retry logic
* Tweak certificate validation code
WASM runtime does not like it when you attempt to load satellite assemblies
for two sets of non-neutral cultures - the first is always loaded. This change
defers loading satellite assemblies until after Program.Main has executed
and the developer has configured the culture for the application.
Fixes https://github.com/dotnet/aspnetcore/issues/21433
* Re-use the Blazor app for stress runs
Our current stress runs re-used the perf tests which recreated the blazor app on each run. Perf runs are meant to run
and be done, however, we want stress apps to be long lasting to capture things like memory leaks.
This change creates a fork in the tests to support stress runs that re-use the app between runs.
- Avoids a task allocation (reuses the existing RequestContext allocation)
- Side benefit is that it's easier to see what things are queued into the threadpool for diagnostics!
* Made changes to FileBufferWriteStream
- Make the internal FileStream write only
- Make a new readable stream over the same file in DrainBufferAsync to copy data to the buffer.
- Added an overload to DrainBufferAsync into a PipeWriter and use this overload in the 2 formatters in MVC. This should reduce the amount of copying from the internal buffer and reduces pinning (since these buffers are already pinned)
- Improved formatter tests