* Removes a bunch of trivial usage of Blazor
... in names and comments where we don't specifically mean Blazor.
* Remove obsolete Startup from Components app
* Move UseBlazor into Blazor.Server
Moves UseBlazor and the related features in Blazor.Server - along with
some other general cleanup of misc shared files.
Now Components.Server has a much slimmer set of dependencies (MVC is
gone) and doesn't contain the "double startup" pattern that we
introduced (sorry).
We'll revisit UseBlazor and the dependencies there once the new
MapFallbackToFile support is available from static files.
* minor PR feedback
* Update reference assemblies
* fix broken test
* Deprecate the Microsoft.AspNetCore.App metapackage in favor of targeting and runtime packs
* Stop producing Microsoft.AspNetCore.App, and runtime.$(rid).Microsoft.AspNetCore.App
* Generate the shared framework without using 'NuGet' restore
* Stop producing intermediate packages for shared-framework only assemblies
* Put the platform manifest into the targeting pack (data/Microsoft.AspNetCore.App.PlatformManifest.txt)
* Create well-known, shared intermediate directories that installers can use to bundle content
- Also obsoleted two unused members on `ImageTagHelper`.
- Removed `NoWarn` for docs on `Microsoft.AspNetCore.Mvc.TagHelpers`.
Addresses aspnet/Docs/#10593
* Make InputBase use EventCallback for ValueChanged
... so that the host component gets re-rendered automatically after each value change (like when binding to DOM elements).
* Improve E2E test code
... so that the host component gets re-rendered automatically after each value change (like when binding to DOM elements).
This creates 3 new build outputs:
* aspnetcore-targeting-pack-$(version).tar.gz
* aspnetcore-targeting-pack-$(version)-linux-x64.deb
* aspnetcore-targeting-pack-$(version)-linux-x64.rpm
Other changes:
* Make RPM packaging consistent with other installers. Vendor == Microsoft Corporation
* Add shared properties for building the targeting pack (or not building it in a servicing build)
* Adds an Azure AD Sample and adds a page to test access denied.
* Renames AzureAD and AzureADB2C internal classes for easier to debug
stacktraces.
* Fixes service registration for options configuration.
* Adds missing deps to the solution.
This change introduces some new heuristics to make it easier to use
'page' or other resevered parameter names as parameters in URL
generation.
--
The main change here is to allow the link generation tree to *ignore* a
value passed in to URL generation when it conflicts with an endpoint's
required values.
The main concern of this feature area is "how do we tell whether you are
linking to an action or a page?". Routing attempts to do the right thing
will requiring very little from the user in terms of expressing intent.
In this case, we try to tell the difference between an attempt to generate
a link to an action due to the presence of the 'action' parameter and
absence of the 'page' parameter. This obviously doesn't work when you
want to use 'page' as a non-reserved parameter in an action. The same
case occurs for pages, but users are already used to the idea that
'action' is a reserved word in MVC.
We can loosen this restriction when the value that's supplied for 'page'
is known not to be any existing value of the 'page' route value.
This approach seems somewhat reasonable but has many of the problems inherent
to this area. When it fails (the value you want to use for 'page' causes
a conflict) - it's going to be esoteric and hard to understand.
[Components] Prerrendering startup experience
* Introduces an IComponentPrerrenderer to handle Prerrendering
* MVC registers a basic static prerrrenderer.
* Components registers a more feature complete prerrender that will
handle reconnection to the original circuit after prerrendering in
the future to allow for prerrendered interactive components.
* Removes UseRazorComponents
* Removes the SPA fallback in favor of a catch all route in
Index.cshtml
* Moves the framework files to be served by the default StaticFiles
middleware in the pipeline by way of plugging specific providers
through options.
* Lifts UseSignalR(r => r.MapHub<ComponentHub>()) into startup and
replaces it with a shorthand for MapHub using endpoint routing.
* Adds extension methods to map components to selectors for a given
hub.
* Updates the razor component templates to include prerendering and use a razor page as the entry
point.
[Templating] Adds authentication support for the SPA templates
* Adds a new -auth option to the Angular and React templates with None and Individual values.
* When using authentication it configures the server to use the ApiAuthorization support built for 3.0
* For angular it adds an ApiAuthorization Angular module that handles the authentication flows through
a Login and a Logout components and exposes an Http client interceptor, a routing guard and a Login
menu component for the main Angular application to integrate authentication into the app.
* For react it adds a Login and Logout components to handle the authentication flows, an
AuthorizeRoute component to protect access to other routes and a Login menu component to
integrate authentication into the application.
* Fix package type to match spec ('DotnetPlatform')
* Fix missing metadata in MSI installer
* Fix incorrect target order which caused duplicate assemblies in netcore.app and aspnetcore.app
* Use .NET Core SequenceReader
Remove BufferReader and use SequenceReader<T> which now ships in CoreFX.
This is related to https://github.com/aspnet/KestrelHttpServer/pull/3068 which builds on the functionality added to the reader.
* Use var
Changes:
* Make Visual Studio 2019 a prerequisite for building this repo
* Update .sln files
* Update Windows SDK to 17134
* Update developer docs
* Disable ANCM tests
* Update to .NET Core SDK 3.0 Preview 2
* Use Microsoft.NET.Sdk.Razor as a package consistently accross the repo
* React to changes in metadata from Microsoft.NETCore.App
* React to changes in .NET Core SDK
* Attempt to workaround CodeCheck.ps1 failure which doesn't repro locally or on different agents. Possibly due to differences in the version of the PowerShell task?
* Remove dead YML file
* Rename usages of win7-{x64,x86} to win-{x64,x86}
* Update KoreBuild to 3.0.0-build-20190219.1
* In Blazor hosted template, only UseBlazorDebugging in development environment. Fixes#7275
* Enable HTTPS in the Razor Components template. Fixes#6928
* Reduce Razor Components template to one project. Fixes#6883
* Minor phrasing tweak
* In Razor Components template, change .cshtml to .razor, except _ViewImports.cshtml
* Put back LangVersion
* Update RazorComponentsTemplateTest
When returning 416 RangeNotSatisfiable in FileResultExecutorBase, set the Content-Length based on the length of the body instead of the length of the original file.
Bugfix for :
https://github.com/aspnet/AspNetCore/issues/4943
Update FileResult tests to detect a bug for the status 416 RangeNotSatisfiable :
https://github.com/aspnet/AspNetCore/issues/4943
When the body is empty, the Content-Length header should be 0 to match the body length.
Part of #6501
This adds a new Windows installer for the targeting pack. It places *.dll and *.xml (docs) in `[DOTNETHOME]\packs\Microsoft.AspNetCore.App.Ref\$(version)\ref\netcoreapp3.0`.
Outputs:
* aspnetcore-targeting-pack-$(version).zip
* aspnetcore-targeting-pack-$(version)-win-x64.exe (defaults to C:\Program Files\dotnet)
* aspnetcore-targeting-pack-$(version)-win-x86.exe (defaults to C:\Program Files (x86)\dotnet)
These all include the same files. These are meant to be bundled in the .NET Core SDK installer, but can be launched directly too.
- #4927
- fully-sanitize class names and filenames
- use aspnet/AspNetCore-Tooling's `CSharpIdentifier` class
- default metadata in sequence [URI or project&document name ->] `%(DocumentPath)` -> `%(OutputPath)` -> `%(ClassName)`
- if user sets metadata explicitly, the override affects defaults later in the sequence
- separate some nested validations and defaulting steps
- provide default `%(DocumentName}` even if `%(DocumentPath}` is set explicitly
- validate URI is absolute even if `%(DocumentPath}` is set explicitly
other:
- don't write out an empty Open API / Swagger file
nits:
- do not use default `%(DocumentName}` in default `%(DocumentPath)` for `<ServiceProjectReference>` items
- do not use empty URI path or query string in default `%(DocumentPath)` for `<ServiceUriReference>` items
- add regression test for #4939
- add `[BindProperty]` doc comments
- add `<remarks>` to `BinderType` properties that recommend setting `BindingSource` in some cases
smaller issues:
- catch invalid `BinderType` values up front
- complete `BindingSource.ModelBinding` implementation: `IValueProvider` filtering was faulty
nits:
- accept VS suggestions e.g. remove unused variables
- "model binder" -> `<see cref="IModelBinder" /> implementation` in some doc comments
- #7052
- add MvcOptions.MaxModelBindingCollectionSize` and `MvcOptions.MaxModelBindingRecursionDepth`
nits:
- update syntax of a few `Resources.Designer.cs` files (I ran `/t:resx` on Mvc.sln)
- take VS suggestions in a few test classes
The changes here make event dispatching (including bind) more
user-friendly by avoiding the need for manual calls to StateHasChnaged.
We also introduce a new type `EventCallback` (and `EventCallback<T>`).
This is a new primitive that is like a super-powered version of a
delegate. When writing a component that accepts delegates as parameters,
consider using `EventCallback` for the following reasons:
- Allows consumer to pass a variety of different delegate signatures
- Does proper event dispatching and error handling
Using `EventCallback` will eliminate most of the remaining cases where a
manual `StateHasChanged` is required when components are passing content
and delegates to each other.
`EventCallback` is inherently async for the reason that this is really
the only way to provide correct error handling.
-----
The fix for this will be two-phase by first creating a set of APIs that
can be targeted by the compiler that has the desired behaviour and then
updating the compiler to target this new infrastructure.
- Basic endpoint routing support to for SignalR hubs, ConnectionHandler and IConnectionBuilder endpoints
- Updated all functional tests and samples to use it
- Added all attributes as metadata from Hubs and ConnectionHandlers
- Added a test to verify client is rejected if auth is ineffective
* Create a new package - Microsoft.AspNetCore.App.Runtime.${rid} - which contains crossgen-ed versions of shared framework assemblies. This will be used by the SDK to replace rid-split packages
* Add a task which can generate the .deps.json file for the shared framework. Unlike the existing task we have, this does not rely on consuming a .deps.json file generated by first running a restore on packages.
* Move the reference to xunit.runner.console into the normal targets and files for managing dependencies
* Produce binlogs during build
- new version
- update baselines
- grab latest released Microsoft.NetCore.App and Microsoft.NETCore.DotNetAppHost
nit:
- updated ZipManifestGenerator's README.md to use 2.2 examples
When a `<Reference>` is named `*.Sources`, set PrivateAssets=All (exclude from generated nuspec) and IncludeAssets=ContentFiles (only consume content files, not .dll's)
* Improve Components error handling
* Change event handlers IHandleEvent, IHandleAfterEvent to be async.
* Return faulted tasks to Renderer instead of handling exceptions in ComponentBase
* Use ILogger in RemoteRenderer, and log to console in WebAssemblyRenderer
* Cleaning up touched files
Fixes https://github.com/aspnet/AspNetCore/issues/4964
Changes:
* Add support for a property, `IsAspNetCoreApp`, in the .csproj file of assemblies which are part of the shared framework.
* Remove unused dependencies
* Remove reference which have become part of 'netcoreapp3.0'
* [Components] Razor class library for components
* Updates the Razor Class Library to be a portable components library by
default.
* Adds an option to support the old RCL that includes support for Views
and pages.
* Usage:
* `dotnet new razorclasslib` produces the same traditional Razor Class Library.
* `dotnet new razorclasslib -s false` produces a Razor Class Library without views and pages support.
* Relayer MvcEndpointDataSource
Separates the statefulness of the data source from the business logic of
how endpoints are created.
I'm separating these concerns because one of the next steps will split
the MvcEndpointDataSource into two data sources.
* Simplify MvcEndpointInfo
Removing things that are unused and leftovers from the 2.2 design of
this feature.
* Remove per-route conventions
Removes the ability to target endpoint conventions
per-conventional-route. This was a neat idea but we have no plans to
ship it for now.
Simplified MvcEndpointInfo and renamed it to reflect its new purpose.
* Remove filtering from MvcEndpointDataSource
This was neat-o but we're not going to ship it like this. We're going to
implement filtering in another place. Putting this in the data source is
pretty clumsy and doesn't work with features like application parts that
need to be baked in addservices
* Simplify ActionEndpointFactory
* Split up data sources
* Use UseRouting in functional tests
I've rejiggered our functional tests to de-emphasize UseMvc(...) and
only use it when we're specifically testing the old scenarios.
UseMvc(...) won't appear in templates in 3.0 so it's legacy.
* Update templates
* Add minor PR feedback
* one more
This change enhances our ambient value logic to also deal with required
values. In 2.2 we introduced a 'required values' semantic to allow route
values to appear "to the left" of a route pattern for the purpose of
ambient values copying. This is a complicated way of saying "when you
like to a different endpoint then discard the ambient values".
What we didn't consider is that some ambient values are special (like
area). So basically, we'll allow an ambient value to be used if it's
part of the required values - even if we've already decided to discard
the ambient values.
This is a pretty surgical fix and only affected the desired scenario
based on tests.
-----
I also removed an optimization that I think is broken. I put an earlier
optimization in place that attempted to count ambient values as they
were "seen" to try and avoid some extra copying. This copying loop has a
cost even if it no-ops which is what I was trying to prevent.
Unfortunately since we added 'required values' - it's now possible for
an ambient value to be double-counted, which makes this optimization
incorrect.
- Removed ViewsFeatureProvider
- Removed PageArgumentBinder and its internal implementation DefaultPageArgumentBinder.
- Removed corresponding test classes/methods for all the above.
- Reacted to class/member changes in dependencies.
#7326
- Use the array pool by default when the shared memory pool is specified for both the StreamPipeReader and StreamPipeWriter
- Support allocating unpooled memory if the StreamPipeWriter is asked for memory outside of the max pool size
Put transitive external dependencies of the shared framework in a separate category, and don't reference them directly unless we are building a patch. This will help us find changes to dependencies, such as the removal of JSON.NET or possible changes to Crypto.Xml.
- We make a scope today around hub invocations, with IAsyncDisposable now implemented in the DI container, we need to support IServiceScope being IAsyncDisposable and IDisposable
* Added Platform utils to detect platform type
* Added additional build for WebWorker
* Changed env param from webworker to platform to make ability to specify platform to the build script
* Updated the readme file with SignalR WebWorker instructions
The BufferWriter called GetMemory(count) and dropped the result, only to then call GetSpan(). This moves the count argument to GetSpan, and drops the call to GetMemory.
This is required to workaround several limitations in the way the .NET Core SDK finds shared frameworks and targeting packs. It allow tests to use shared frameworks and targeting packs.
It also matches the patterns established in other aspnet and dotnet repos. This should reduce the friction required to adopt Arcade SDK.
## Changes
* This moves the default location of the .NET Core SDK installation into `$repoRoot/.dotnet`. This location was already in use for CI builds.
* Update the build step for Microsoft.AspNetCore.App to install the shared framework into the local copy of the .NET Core SDK
## Recommendations
* Use the "startvs.cmd" script to launch Visual Studio. This will set required environment variables to make VS happier than if you just double click the .sln file.
* Use "activate.sh/ps1" if you want to run `dotnet build`, `dotnet test` and other dotnet commands. These will set required environment variables, including PATH.
* I recommend removing %USERPROFILE%/.dotnet to your PATH variable if you had added it manually before. This will no longer match what build tools will install.
* `git clean -xfd -e .dotnet/` preserves the folder so you don’t have to re-download the SDK again.