* Rename Host.cshtml to _Host.cshtml
* In Startup.cs, specify root component and selector explicitly so you can easily disable prerendering if desired
* Remove unneccesary dependency on NewtonsoftJson package
* Remove unnecessary MapRazorPages and make blank lines consistent
* Rename "Services" subdirectory to "Data"
* Remove favicon.ico (no longer needed since we switched to MapFallbackToPage
* Revert MapComponentHub change due to reasons
* [MVC][Components] Prerendering + Robust reconnect
* Relayers prerendering support on a separate package on top of MVC and
components.
* Implements robust reconects with acknowledgements from the client.
* Improves interactive prerendering with the ability to reconnect to
prerendered components.
* Removes the need to register components statically when prerendering
them.
* Removes the need of using an element selector when prerendering an
interactive component.
* Updates the templates to use the new fallback routing pattern and
reenables the components test.
* Adds eslint to the Typescript project to help maintain a consistent
style.
* Adds logging to support better debugging based on the pattern used by
signalr.
* Fixes exception handling on the server to always report exceptions correctly to the client.
These are *new style* for configuring MVC in services. We're adding these to make
things feel a bit more tailored to those particular scenarios.
----
The main reason for this is that we've had repeated community asks for an
*API-optimized* way of configuring MVC. I don't think that using AddMvcCore
is a suitable building block, because it has too many options that you want.
I've think I've identified the reasonable set of features that should be part
of the default experience for APIs. All of these things are already pay-for-play
and are activated by the presence of attributes. The only additional cost is
loading of assemblies and a few additional inspections of the attributes
(cached).
----
Additionally the AddControllers experience is composible. You can add views
to it, or add pages and get the whole thing.
AddRazorPages is basically an alias for what AddMvc does today. We don't
currently have a way to add pages without controllers (the opposite is true).
Based on feedback we could specialize this more.
----
Branding and perception are important, and we've users ask for more flexibility
in what gets added. The plan is to update the templates to use this experience
in preview4, and see what kind of feedback we get.
* Make endpoint middleware explicit
This change makes the endpoint middleware explicit again, and updates
all of the templates.
The other change here is make UseEndpoints be the place where you
register endpoints. This is vital because it puts your code visually at
the point of the pipeline where it executes.
Lastly, I removed support for UseMvc with endpoint routing. This is
causing issues for some security features, and we're moving in the
direction of trying to make the middleware heavy implementation required
in 3.0. There are some issues we won't be able to fix in MVC if we can't
unambiguously know if UseMvc was used or the middleware.
* Improved selenium start and tear down
* Selenium is set up and torn down in an assembly fixture.
* Selenium is initialized lazily and in a non-blocking way.
* Selenium processes are tracked as part of the build and their pids
written to a file on disk for cleanup in the event of unexpected
termination of the test process.
* Browser fixture retries with linear backoff to create a remote
driver. Under heavy load (like when we are doing a simultaneous NPM
restore) the selenium server can become unresponsive so we retry
three times, with a longer comand timeout allowance each time up to
a max of 3 minutes.
* Moved test project setup to build time instead of runtime.
* Added target PrepareForTest to create the required files for testing
* The template creation folder.
* The template props file to use our built packages.
* The folder for the custom hive.
* Added assembly metadata attributes to find all the data we need to
run the tests.
* Path to the artifacts shipping packages folder.
* Path to the artifacts non-shipping packages folder.
* Path to the test templates creation folder.
* Path to use for the custom templating hive used in tests.
* Proper cleanup as part of the build
* Remove the test templates creation folder.
* Remove the test packages restore path.
* Recreate the test templates creation folder.
* Recreate the test packages restore path.
* Generated Directory.Build.Props and Directory.Build.Targets in the
test templates creation folder.
* Cleaned up potentially stale templatetestsprops.
* Improved test flows
* Initialization is done lazily and asynchronously.
* Selenium
* Browser fixture
* Template initialization.
* Flattened test flows to avoid assertions inside deep callstacks.
* All assertions happen at the test level with improved error messages.
* With the exception of the migrations assertions.
* Assertions contain information about which step failed, for what
project and what failure details.
* Broke down tests to perform individual steps instead of mixing build
and publish.
* Publish project.
* Build project. (Debug)
* Run built project.
* Run published project.
* Concentrated build logic into the Project class.
* Context between the different steps of a test is maintained in
this class.
* All operations that require coordination are performed within this
class.
* There is a lock for dotnet and a lock for nodejs. When building
SPAs we acquire the nodejs lock to correctly prevent multiple
runs of nodejs in parallel.
[ApiAuthorization template cleanups]
* Fix preview3 issues with breaking changes on Entity framework by
manually configuring the model in ApiAuthorizationDbContext.
* Add app.db to the project file when using local db.
* Fix linting errors on angular template.
* Fix react tests
* Add tests to cover new auth options in the SPA templates.
* Unify the Templating and Components testing infrastructure.
* Enable test project discovery in the components E2E tests.
* Enable selectively disabling Selenium tests through build properties.
* 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
[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.
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 a `<Reference>` is named `*.Sources`, set PrivateAssets=All (exclude from generated nuspec) and IncludeAssets=ContentFiles (only consume content files, not .dll's)
* [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 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.
Changes:
* Remove obsolete targets which are unnecessary now that this repo no longer builds git submodules in a separate build process
* Remove the need for static analysis of 'ArtifactInfo' items
* Simplify how the code signing task is configured
* Remove unused repo tasks
* Remove duplicate lists of external dependencies and packages to be produced
* Remove obsolete build definition
* Remove obsolete build script parameters
* Add VisualStudioSetupOutputPath