Commit Graph

18102 Commits

Author SHA1 Message Date
DotNet Bot 844a82e37c Merged PR 8040: [internal/release/3.1] Update dependencies from dnceng/internal/dotnet-efcore
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)
2020-05-21 19:47:40 +00:00
Javier Calvarro Nelson a9449cd20c
[Templates] Update SPA dependencies to keep npm audit happy (#21330)
* Update react dependencies

* Update angular dependencies

* Update react-redux dependencies
2020-05-18 14:59:29 -07:00
Brennan 66ddf3523a Fix cleaning send queue on restart (#18511) 2020-05-18 14:58:38 -07:00
William Godbe 817127dfd0
[release/3.1] Give .msi's non-stable branding (#21801)
* Give .msi's non-stable branding

* Add BuildNumber to version

* Make GUIDInputs unique per-build
2020-05-14 16:34:09 -07:00
Doug Bunting de38479e5f
Improve build reliability (#20760)
* 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.
2020-05-13 11:31:09 -07:00
Ryan Nowak b194b6c90a
Fix use of precedence in endpoint routing DFA (#20801) (#21200)
* Fix use of precedence in endpoint routing DFA

Fixes: #18677
Fixes: #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
2020-05-13 11:12:14 -07:00
Brennan 8ff1cb906d
Set certificate in some Kestrel tests to avoid global machine state (#21516) (#21542) 2020-05-13 11:11:02 -07:00
William Godbe 9e2a480925
[release/3.1] Add .version file to shared framework zip (#21548)
* Add .version file to shared framework zip

* Fix test
2020-05-13 10:59:55 -07:00
Will Godbe a14119a308 Merge remote-tracking branch 'internal/internal/release/3.1' into wtgodbe/315 2020-05-12 16:02:32 -07:00
John Luo 2ec9b2e5d1 Use the correct crossgen 2020-04-28 17:23:53 -07:00
John Luo 05f58bbbfa Build aspnetcore for win-arm64 (#19317)
* Build for win-arm64

* Missed file

* Disable Selenium tests on arm64

* Include installers in the uploaded artifacts
2020-04-27 00:34:47 -07:00
dotnet-bot 4f307c40be Merge in 'release/3.1' changes 2020-04-15 19:43:15 +00:00
David Fowler 1b99352ec7
Don't re-use DefaultHttpContext if IHttpContextAccessor is in use (#15049) (#20844)
* Don't re-use DefaultHttpContext if IHttpContextAccessor is in use
- Consumers may still get null or an ODE but will never end up with data from a different request.
- Make sure an ODE is thrown from all properties on HttpContext after the request is over.
2020-04-15 12:41:59 -07:00
dotnet-bot 12c9727281 Merge in 'release/3.1' changes 2020-04-15 19:27:41 +00:00
Brennan 5353ce9509
Use SemVer1 for SiteExtension (#20839) 2020-04-15 12:26:21 -07:00
Pranav Krishnamoorthy 23c02ef9a9 Merged PR 7269: Avoid caching JsonSerializer
Avoid caching JsonSerializer
2020-04-14 22:38:24 +00:00
dotnet-bot 45a57eac45 Merge in 'release/3.1' changes 2020-04-14 20:46:41 +00:00
BrennanConroy 260de2c10b Add BuildNumber to SiteExtension build 2020-04-14 13:42:25 -07:00
dotnet-bot a2428c7175 Merge in 'release/3.1' changes 2020-04-14 20:01:33 +00:00
William Godbe 01429973ee
[release/3.1] Pass access token as query string when running SignalR in the browser (#20466)
* Pass access token as query string when running SignalR in the browser

* WEBASSEMBLY -> BROWSER
2020-04-14 12:59:06 -07:00
dotnet-bot e3bd613f37 Merge in 'release/3.1' changes 2020-04-14 18:01:07 +00:00
William Godbe 8218d6e0e7
Fix various "Type or namespace not found" errors (#20736)
* Add manual packageReferences where needed

* Add more explicit packageRefs

* Fix typo

* undo changes to blazor.server.js

* Fix typo

* Don't gen ref assemblies in CodeCheck
2020-04-14 10:57:26 -07:00
James Newton-King b53179267a Merged PR 6773: Fix routing policy exit destination
**Description**

An infinite loop can happen in routing if there is a catch all route with host name matching.

This problem is caused by the DFA matcher builder giving an incorrect exit destination to policies. Currently the exit destination is the catch all state, so the policy will transition to itself when there is no match. It will run again, transition to itself again, run again, etc. This causes the policy to run forever.

What should happen is the host name policy fails, it transitions to the final state with no candidates, and the route matcher does not match any endpoints. The browser is returned a 404 status.

**Customer Impact**

This problem shows up in this situation:
1. If a customer has configured a catch all route in their app
2. The catch all route has host matching
3. A browser makes a request to the server that matches the catch all route but doesn't match the host name

The route matcher will run forever, using up a threadpool thread. When threadpool threads are exhausted the server will stop responding.

**Regression?**

No.

**Risk**

Medium. The fix is simple but route matching is complex, and routing runs with every request.
2020-04-02 20:30:18 +00:00
William Godbe 2d6827a678
Always generate checksums as last part of publish job (#20367)
* Always generate checksums as last part of publish job

* Initialize props correctly

* Fix wildcard

* Import Arcade SDK

* Add NoWarn MSB4011

* Make import conditional on GenerateChecksums

* Select specific files to checksum

* Respond to feedback

* AfterTargets -> BeforeTargets
2020-04-01 16:25:37 -07:00
John Luo 306ef044cf
Conditionally enable/disable targeting pack tests (#20255) 2020-03-28 18:04:20 -07:00
Brennan 654cf06615
Backport ANCM environment variable additions (#20006) 2020-03-27 10:56:49 -07:00
William Godbe 1040be3588
Include third-party-notices.txt in all packages (#20166)
* Include third-party-notices.txt in all packages

* Fix version test filename
2020-03-27 10:15:32 -07:00
Brennan 9514a865ef
[SignalR] Avoid deadlock with closing and user callbacks (#19612) (#19664)
* [SignalR] Avoid deadlock with closing and user callbacks (#19612)

* fb
2020-03-25 13:13:02 -07:00
William Godbe 7bda94ab0a
Update branding to 3.1.4 (#20110)
* Update branding to 3.1.4

* Disable targeting pack tests

* Use 3.1.103 SDK
2020-03-25 09:16:36 -07:00
John Luo 042e642aea
Add missing assemblies to ref pack (#19161)
* Add missing assemblies to ref pack

* amend

* Update comments too

* Use patchVersion=0 for ref pack dependencies

* Fixup versions

* Enable targeting pack tests

* Fix targeting pack test

* Feedback

* Update Microsoft.AspNetCore.App.Ref.csproj

* Downgrade System.* versions for all ref/ projects

- yeah, @JunTaoLuo and I agreed w/ you @wtgodbe

* Update condition

Co-authored-by: William Godbe <wigodbe@microsoft.com>
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
2020-02-20 15:01:28 -08:00
Javier Calvarro Nelson 7ee3aeb9e0
[SPA] Updates the angular and react dependencies (#19103)
* Update react dependencies

* Update angular dependencies

* Update react-redux dependencies

* Update more react dependencies

* Fix angular issues

* Fix authorize route
2020-02-18 18:09:02 -08:00
William Godbe bdb6a38c47
Publish Checksums to dotnetclichecksums storage account (#19038)
* Update dependencies from Arcade

* Try publishing checksums

* Fix some errors

* Set RelativeBlobPath

* Fix publish location

* Centralize ChecksumExtension

* Fix use of ChecksumExtension in publishing.props
2020-02-14 15:28:30 -08:00
Pranav K e29c495166
Transfer endpoint metadata from PageActionDescriptor to CompiledPageActionDescriptor (#19061)
Fixes https://github.com/dotnet/aspnetcore/issues/17300
2020-02-14 10:53:46 -08:00
Stephen Halter 439f4af49c
Cache _absoluteRequestTarget when reusing strings (#18547) 2020-02-14 09:38:31 -08:00
Stephen Halter f3e2b4d4d1
Keep Pipe readable after FormPipeReader error (#18939) 2020-02-14 09:36:57 -08:00
Brennan ba74c35f0e
Build 3.1 site extension (#18568) 2020-02-14 09:35:01 -08:00
Alessio Franceschelli d05c9f465c
HeaderPropagation: reset AsyncLocal per request (#18300)
As Kestrel can bleed the AsyncLocal across requests,
see https://github.com/aspnet/AspNetCore/issues/13991.
2020-02-14 09:33:26 -08:00
Stephen Halter 7fa6d19644
Add option to interpret request headers as Latin1 (#18255) 2020-02-14 09:32:36 -08:00
Jacques Eloff a633c66dc6
Fix layout of installer help page for non-ENU locales, #18152 (#18246) 2020-02-14 09:31:17 -08:00
Pranav K e8d31697ad
Add an option to enable runtime compilation (#18648) 2020-02-14 08:35:06 -08:00
Pranav K d7f98bd562
Use reference equality to compare model instances in EditContext (#18172) (#18649)
* Use reference equality to compare model instances in EditContext

Fixes https://github.com/aspnet/AspNetCore/issues/18069
2020-02-14 08:34:44 -08:00
Pranav K 1027e5372f
Use the analyzer from the SDK when available (#18885)
* Use the analyzer from the SDK when available

This prevents a build warning when building a project that contains a reference to
Microsoft.AspNetCore.Components and a netcoreapp3.0 or newer targeting Web project.

The Web SDK implicitly adds the Components.Analyzer for netcoreapp3.0 or newer targeting projects.
If the project additionally referenced this package (directly or transitively), the package would
set up a property that prevented the implicit analyzer reference. This prevented the analyzer from
being referenced twice.

There were two issues with the current approach:

a) The props file wasn't propogated via buildTransitive. Consequently transitive project references
would reference two copies of the analyzer. When these were different versions, it resulted in a compiler
warning.

b) Forward looking, this prevents newer versions of the analyzer shipped from the SDK from ever being used.
This is particularly problematic since apps are likely to reference component libraries that were previously
compiled against 3.x.

This change attempts to mitigate both of these issues:

a) We add a buildTransitive so our build targets flow
b) We knock out the analyzer added by the package if the SDK's already added it.

Fixes https://github.com/dotnet/aspnetcore/issues/18563

* Update Microsoft.AspNetCore.Components.Analyzers.targets

* Update Microsoft.AspNetCore.Components.Analyzers.targets

* Add a description

* Update Microsoft.AspNetCore.Components.Analyzers.targets
2020-02-14 08:34:23 -08:00
John Luo d10a352e8c
Remove non-existing dependency in Identity.Specification.Tests (#18790) 2020-02-13 16:29:28 -08:00
Doug Bunting a6c43b14a1
Mark AspNetCore projects that aren't packaged explicitly (#18767)
* Mark AspNetCore projects that aren't packaged explicitly
- avoid NU5104 warnings due to confusing versioning
- `$(IsShippingPackage)` was semantically incorrect in any case

* Remove redundant `$(IsShippingPackage)` settings in `$(IsAspNetCoreApp)` projects
- default is `true` for all implementation projects

* Use `$(IsPackable)` when deciding how `$(IsAspNetCoreApp)` projects are handled
- remove all use of `$(IsShippingPackage)` for shared framework composition
- update documentation to match these changes

nits:
- remove odd default for `$(IsPackable)` in Directory.Build.targets
  - no longer relevant since all `$(IsAspNetCoreApp)` projects are `$(IsShippingPackage)` too
- include more information in docs/ProjectProperties.md

* Add direct System.Text.Json references
- avoid MSB3277 warnings
2020-02-13 15:51:27 -08:00
dotnet-maestro-bot 2dc908d502 [automated] Merge branch 'release/2.1' => 'release/3.1' (#18396)
* [Platform] Detect and fix certificates with potentially inaccessible keys on Mac OS (2.1) (#17560)

* [Https] Detects and fixes HTTPS certificates where the key is not guaranteed to be accessible across security partitions

* Fix dotnet dev-certs https --check

* Update logic for detecting missing certs

* Fix security command

* Update warning logic

* Check that the key is accessible in Kestrel

* Add correct link to docs

* Update src/Tools/dotnet-dev-certs/src/Program.cs

Co-Authored-By: Daniel Roth <daroth@microsoft.com>

* Update src/Tools/dotnet-dev-certs/src/Program.cs

Co-Authored-By: Daniel Roth <daroth@microsoft.com>

* Add test for 2.1

* Update src/Tools/dotnet-dev-certs/src/Program.cs

Co-Authored-By: Chris Ross <Tratcher@Outlook.com>

* Address feedback

* Fix non-interctive path

* Fix tests

* Remove a couple of test from an unshipped product

* Check only for certificates considered valid

* Switch the exception being caught, remove invalid test

Co-authored-by: Daniel Roth <daroth@microsoft.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>

* Fix patchconfig merge (#18389)

* Fix flaky HubConnectionHandler test (#18391)

Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
Co-authored-by: Daniel Roth <daroth@microsoft.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
Co-authored-by: Brennan <brecon@microsoft.com>
2020-01-17 08:30:12 -08:00
Pranav K cd518e9da3 Use reference assemblies when compiling Razor views (#18395)
* Use reference assemblies when compiling Razor views
Fixes https://github.com/dotnet/aspnetcore/issues/18323

* Avoid mixing runtime and ref assembly
2020-01-16 17:56:14 -08:00
Brennan 28240ce460 Fix flaky HubConnectionHandler test (#18391) 2020-01-16 14:24:34 -08:00
Artak 452a822b62 Added the Blazor survey link to the Blazor-Server project template (#17434)
* Added the survey link to the Blazor Server project

* Use new survey link for server project

* Updated the baseline to include the SurveyPrompt.razor file

* Added the SurveyPrompt.razor to all the test baselines
2020-01-16 13:21:37 -08:00
John Luo bc7135c202
Merge pull request #18369 from dotnet/jkotalik/merge31
Merge 2.1 into 3.1
2020-01-16 11:29:26 -08:00
Pranav K 6a8ce3ad67 Add support for IAsyncEnumerable<T> where T is value type (#17154) (#17563)
* Add support for IAsyncEnumerable<T> where T is value type (#17154)

* Add support for IAsyncEnumerable<T> where T is value type

Fixes https://github.com/aspnet/AspNetCore/issues/17139

* Fixup ref asm

* undo changes to blazor.server.js
2020-01-16 10:32:29 -08:00