Commit Graph

18140 Commits

Author SHA1 Message Date
Javier Calvarro Nelson 9ded8e17d4
Change MapBlazorWebAssemblyApplication to UseBlazorFrameworkFiles (#19198) 2020-02-21 04:20:41 -08:00
Steve Sanderson 06def5cee6 Workaround CacheStorage API bug 2020-02-20 21:31:19 +00:00
Marlon Regenhardt 6a85855fbb
[Blazor][Wasm] Move HttpClient from default services to Program.Main (#19119)
* [Blazor][Wasm] Move HttpClient from default services to extension method (#16929)

* Apply suggestions from code review

Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
2020-02-20 10:47:49 -08:00
Steve Sanderson e9ccd7fe08 Only the PWA template should produce ServiceWorkerAssetsManifest 2020-02-20 12:16:27 +00:00
Javier Calvarro Nelson c39bc6a6bd
[Blazor] Move to MapBlazorWebAssemblyApplication (#19147)
Move to MapBlazorWebAssemblyApplication as the way to map blazor files into a hosted application.
2020-02-19 23:56:43 -08:00
Artak 6342a812f3
Update launchSettings.json for BlazorWASM (#19136)
* Update launchSettings.json for BlazorWASM

* Remove the `useWebAssemblyDebugging` setting as its no longer needed
2020-02-19 13:25:21 -08:00
Pranav K 1dfbe75e9f
Rename Blazor.Mono -> Components.WebAssembly.Runtime (#19124)
* Rename Blazor.Mono -> Components.WebAssembly.Runtime
2020-02-19 09:06:50 -08:00
Steve Sanderson 38f3267208 Fix token in PWA manifest 2020-02-19 16:17:02 +00:00
Javier Calvarro Nelson 0e155fd7ca
[Fixes #12588][Blazor] Move Blazor to use Static Web Assets (#18409)
* [Blazor] Move Blazor to use Static Web Assets
* Plugs-in Blazor wasm through the static web assets infrastructure.
* Avoids the need for a custom Blazor.config file.
* Removes broken auto-rebuild and debug support.
* Removes unnecessary server-side Blazor helpers.
2020-02-19 04:05:03 -08:00
Pranav K 52c4598618
Fixup 2020-02-18 15:26:15 -08:00
Pranav K 92409e2e57 Make the dev-server log less (#18971)
* Make the dev-server log less
* Allow loading a user configured settings file
2020-02-18 15:08:30 -08:00
Pranav K 31f63d9e72 Add a perf scenario involing nested components + editing
* Adds additional scenarios to address https://github.com/dotnet/aspnetcore/issues/17011
* Include commit hash so we can track the build of Blazor WASM associated with a perf run
* Port some infrastructure fixes from master

Fixes https://github.com/dotnet/aspnetcore/issues/17011
2020-02-18 15:08:30 -08:00
Pranav K e521205b5d
Rename Blazor.Mono -> Components.WebAssembly.Runtime 2020-02-18 14:16:59 -08:00
Pranav K c935e9aa2d
Blazor WebAssembly package renames (#19026)
Fixes https://github.com/dotnet/aspnetcore/issues/18384
2020-02-18 10:54:28 -08:00
Javier Calvarro Nelson 07098b3d97
[Blazor][Wasm] Template changes to support auth in Blazor wasm (#18933)
* [Blazor] Adds a project template option for individual auth
* Handles hosted scenarios with Identity Server.
* Handles non-hosted scenarios with oidc-client.js.
* Handles AAD and B2C scenarios with an MSAL library (disabled for now).
2020-02-17 17:27:21 -08:00
Javier Calvarro Nelson 0dbb01bd8c
[Blazor] Adds an authentication library for Blazor webassembly (#18851)
* Adds a Microsoft.AspNetCore.Components.WebAssembly.Authentication
  library for performing authentication in Blazor webassembly.
* Includes a default implementation that supports OIDC capable IdPs
  using oidc-client.js
* Includes multiple primitives to deal with authentication flows and
  supports acquiring access tokens to call APIs.
  * RemoteAuthenticatorView is responsible for handling authentication
    operations at the user interface level.
  * RemoteAuthenticatorService is responsible for handling the lower
    level authentication details by using JavaScript interop to interact
    with the underlying javascript library implementing the auth protocol.
  * SignOutSessionStateManager handles CSRF protection for the logout
    path.
  * IAccessTokenProvider handles provisioning access tokens to call APIs.
2020-02-17 14:36:57 -08:00
Steve Sanderson 4628dfb005
Cache assemblies and wasm using content hashes (#18859) 2020-02-17 17:17:44 +00:00
thetownfool 8fb412e960
allow valid error message to be displayed on linux (#18997)
when attempting to enable client debugging on blazor-wasm an attempt to
provide a helpful message casues an ¨Unknown OS platform¨ exception

relates to #16366 #12970
2020-02-14 10:37:23 -08:00
Steve Sanderson 04b4602c2b
PWA template (#18878)
* Add service worker

* Add manifest

* Bring back BaselineTest.cs

* Add baselines for blazorwasm templates

* Add publishing test for PWA template

* Baseline fixes

* Fix baseline test logic to allow for multi-project outputs

* Remove non-blazorwasm baselines, since this branch now only covers blazorwasm

* Add test for PWA publish output

* Beginning generation of assets manifest

* Generate assets manifest including blazor outputs

* Tweaks

* Write assets manifest in JSON form

* Publish service worker

* Better API

* More resilience

* Better API again

* Make ComputeBlazorAssetsManifestItems public as people will need to customize the list

* Exclude service worker files from assets manifest

* Use web standard format for hash

* Update project template

* In assets manifest, only include items being published

* Renames

* Compute default assets manifest version by combining hashes

* Emit sw manifest in .js form

* Update service worker in project

* Actually isolate browser instances when requested during E2E tests

* E2E test for published PWA operating offline

* Fix SWAM path in template

* Clarify targets
2020-02-14 15:52:23 +00:00
Pranav K fb50111c92
No-op if ValidateComplexType is validated without the right context (#18935)
Fixes https://github.com/dotnet/aspnetcore/issues/17316
2020-02-13 15:29:27 -08:00
Pranav K fd9f20311d
Only update the dev-server 2020-02-12 14:20:10 -08:00
Pranav K c38765628d
Build against the 3.1.0 AspNetCore
The version of the runtime that projects compile against
is stamped in to the runtimeconfig.json. In an earlier change, the AspNetCoreRef version
was bumped up to 3.1.2 which causes running dotnet dev-serve to fail
if you do not have the runtime installed.

In addition, the template json allows roll-forwards to major version (5.0 versions) if that's the only version
available. We do this with the razor compiler:
https://github.com/dotnet/aspnetcore-tooling/blob/master/src/Razor/src/Microsoft.AspNetCore.Razor.Tools/runtimeconfig.template.json
2020-02-11 16:37:14 -08:00
Pranav K 376f378c0a
Ensure resolved assemblies works correctly when not linked + incremental build (#18797)
Fixes https://github.com/dotnet/aspnetcore/issues/18752
2020-02-11 09:12:17 -08:00
William Godbe cae6a9cfb3
Use non-stable versioning in blazor-wasm (#18894)
* Use stable versioning in blazor-wasm

* This branch never builds the targeting pack

* Update eng/Versions.props

* Undo changes to patchconfig.props

Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-02-10 14:05:36 -08:00
Ryan Nowak 82cbdc604e Remove Auto-Rebuild dead-code
Fixes: #17248

Removes the (*unused*) auto-rebuild code left over from early Blazor
previews.
2020-02-10 08:01:58 -08:00
Artak d39ed09c29 Auto-generate random port and proper project settings for the server project (#18842) 2020-02-09 12:21:47 -08:00
Pranav K aa2d1057cf
Workaround analyzer 2020-02-05 14:56:36 -08:00
Pranav K 9450e95f2e
Merge branch 'blazor-wasm' into prkrishn/purge 2020-02-05 12:29:19 -08:00
Steve Sanderson 27b2872344 Support VS Code "pwa-chrome" debug type 2020-02-05 18:35:06 +00:00
Pranav K 96db485508
Remove extra sln 2020-02-05 10:26:43 -08:00
Pranav K 58fd885ffe
Undo changes to baseline 2020-02-05 10:23:40 -08:00
Pranav K af8aa0fe6e
Fixup error on SDK restore 2020-02-04 11:45:29 -08:00
Pranav K f54902f169
Purge the blazor-wasm branch 2020-02-03 17:49:41 -08:00
Steve Sanderson 4360535bab
Update to newer ws-proxy sources (#18760)
* Update to latest ws-proxy sources

* Changes needed inside ws-proxy sources for inclusion in Microsoft.AspNetCore.Blazor.Server

* Use ILogger in ws-proxy

* Fix for /json endpoint when on HTTPS
2020-02-03 13:49:44 -08:00
Pranav K bbafecc053
Update Web.JS scripts (#18635) 2020-01-28 13:18:31 -08:00
Pranav K bb1b2c4bf2
Use scenario name for measurements and metadata (#18609) 2020-01-28 09:08:57 -08:00
Ajay Bhargav B 24be2992de
Run Blazor E2E tests on SauceLabs (#18456)
* Run Blazor E2E tests on SauceLabs

* Added azure pipeline

* update yml

* Update meta

* More changes
2020-01-27 17:54:18 -08:00
Pranav K e24f73e14b
Fix build warnings in MonoProxy (#18573) 2020-01-24 16:04:11 -08:00
Pranav K 9bdf208631
Fixup bad merge (#18570) 2020-01-24 15:05:45 -08:00
Daniel Roth 5f43e7a8a8
Update survey link for 3.2.0-preview1 (#18513) 2020-01-23 09:01:15 -08:00
Javier Calvarro Nelson ffac687091
Revert "[Fixes #17014] Add an auth-enabled template for Blazor WASM projects (#18354)" (#18516)
This reverts commit e64b8a91ad.
2020-01-22 14:00:39 -08:00
Pranav K c7e6beec3c
Include compressed size in output (#18485) 2020-01-21 16:38:22 -08:00
Ryan Nowak 3111032dc0 Rework of Blazor startup experience
Fixes: #16874

This is a significant simplication of our startup code model for Blazor
wasm with the goal of removing concepts that don't make much sense here.
Previously in this area we've tried to be consistent with ASP.NET Core
on the server, but it's not helping up much in WASM.

We're still leveraging some of the lessons from server-size ASP.NET
(hello CreateDefaultBuilder) but consistency is no longer a goal.

This change actually makes a bunch of scenarios better (rather than
removing features) - it's now possible to access services from the
application's DI scope and initialize them before the UI is shown
`RunAsync`.

This change also adds configuration in a central way. There's nothing in
this change that populates configuration in an automatic way, that will
come next.
2020-01-21 15:48:49 -08:00
Pranav K ba08d60cb9
Update names and descriptions for benchmarks (#18430) 2020-01-21 14:43:34 -08:00
Steve Sanderson 05f2430bbd Update Mono debug proxy code (#18478) 2020-01-21 13:33:27 -08:00
Ajay Bhargav B 0f2e88a334
Added launchSettings.json for Blazor wasm templates (#18368)
* Added launchSettings.json for Blazor wasm templates

* Updated launchSettings

* removed windows auth option
2020-01-21 12:45:25 -08:00
William Godbe 1f61fc6cb1
Update dependencies from dotnet/blazor (#18424)
* Update dependencies from dotnet/blazor

* Update version of blazor package used

* Removed obsolete WipedMethod invocation test

* react to mono.wasm to dotnet.wasm rename

* Leftover code cleanup
2020-01-17 15:56:08 -08:00
Javier Calvarro Nelson e64b8a91ad
[Fixes #17014] Add an auth-enabled template for Blazor WASM projects (#18354)
* [Fixes #17014] Add an auth-enabled template for Blazor WASM projects
* The template enables auth using cookies.
* Includes a UserController to return the user claims/data to the user
* Includes an IdentityAuthenticationStateProvider that fetches the
  claims data from the application.
* It requires a hosted project.
2020-01-17 12:44:30 -08:00
Pranav K 4ab5fe6803
Handle satellite assemblies in the Blazor build targets (#18207)
* Handle satellite assemblies in the Blazor build targets

* Pass the same closure of assemblies that is used by the SDK's linker to Blazor's linker and ResolveBlazorRuntimeDependencies task
* Quote the mono linker path

Fixes https://github.com/dotnet/aspnetcore/issues/17644
Fixes https://github.com/dotnet/aspnetcore/issues/17754
2020-01-15 10:43:58 -08:00
Pranav K 1e62df1a2d
Try self-contained 2020-01-13 17:05:01 -08:00
Pranav K dd524df6bb
Application started 2020-01-13 14:42:02 -08:00
Pranav K 17b1dc9841
Add a benchmarking app for Blazor Wasm 2020-01-13 14:42:02 -08:00
Pranav K 80a67874c6
Resolve merge conflicts 2020-01-10 10:43:25 -08:00
Pranav K 3fb171e282
Handle satellite assemblies in the Blazor build targets
* Pass the same closure of assemblies that is used by the SDK's linker to Blazor's linker and ResolveBlazorRuntimeDependencies task
* Quote the mono linker path

Fixes https://github.com/dotnet/aspnetcore/issues/17644
Fixes https://github.com/dotnet/aspnetcore/issues/17754
2020-01-10 10:03:02 -08:00
Steve Sanderson 2e2d0625e1 Write unlinked.output to disk 2020-01-10 16:31:34 +00:00
Steve Sanderson cb092258c3 Allow overwriting outputs with older inputs. Fixes #18192 2020-01-10 16:31:34 +00:00
Steve Sanderson a181fd5232
Link more assemblies (type granularity linking for real this time) (#18165) 2020-01-10 11:30:55 +00:00
Pranav K d4ada348fb
Use Blazor version for WASM templates (#18174) 2020-01-07 13:42:25 -08:00
Pranav K 66ecdab542
Ensure $(Configuration) is evaluated prior to using it (#18113)
Fixes https://github.com/aspnet/AspNetCore/issues/12779
2020-01-06 08:39:56 -08:00
Pranav K baf72c73c5 Avoid copying the shared fx in blazor-wasm 2020-01-03 15:05:53 -08:00
Pranav K 1c3ae1549e Add publish test for BlazorStandalone 2020-01-03 15:05:53 -08:00
Pranav K 62e2fb22e5
Use mono_bind_static_method for invoking JS methods (#17942)
* Use mono_bind_static_method for invoking JS methods
2019-12-18 12:18:18 -08:00
Javier Calvarro Nelson e4c0ec3ca6
[Blazor] Update branding for the next release (#17852) 2019-12-13 14:36:52 +01:00
Steve Sanderson 3a93704737
Support async main (#17673) 2019-12-12 15:05:12 +00:00
Pranav K 3fba107522
Fix typo in error message (#17741) 2019-12-10 11:30:13 -08:00
John Luo bb4f3a513d
Merge branch 'blazor-wasm' into merge/release/3.1-to-blazor-wasm 2019-12-08 13:31:02 -08:00
William Godbe 1f114dff50
Download runtime from suffixed location in dotnetcli blob storage (#17592) 2019-12-05 12:33:38 -08:00
Pranav K 51f0e07b63
Merge branch 'blazor-wasm' into merge/release/3.1-to-blazor-wasm 2019-12-05 10:59:13 -08:00
William Godbe 99979efaf6
Update branding to 3.1.1 (#17335)
* Update branding to 3.1.1

* Add *

* Skip RefPack tests

* Update baseline
2019-12-04 15:45:00 -08:00
Pranav K 7fc46862ea
Run build and publish tests for Blazor templates (#17410)
* Add build and publish tests for Blazor hosted
*  Add build tests for Blazor standalone
* Cleanup project template

Fixes https://github.com/aspnet/AspNetCore/issues/14866
Fixes https://github.com/aspnet/AspNetCore/issues/10269
Fixes https://github.com/aspnet/AspNetCore/issues/9168
2019-12-03 14:29:05 -08:00
Pranav K 76ae0a2e21
Build fewer things in blazor-wasm (#17533) 2019-12-03 13:47:33 -08:00
Javier Calvarro Nelson ca893e25a5
[Blazor] Fixes publish issue with static web assets on hosted scenarios (#17496) 2019-11-29 20:44:14 +01:00
Javier Calvarro Nelson e3dcd41304
[Blazor] Pins the SDK version to 3.1 and forces Blazor projects to compile against it (#17479) 2019-11-28 23:12:44 +01:00
Steve Sanderson 548ae26e21 Fix Blazor WebAssembly hosted publishing 2019-11-28 12:41:21 +00:00
Pranav K 0c11c75641 [Blazor] Fix Blazor.build package (#17463) 2019-11-28 04:50:50 +01:00
dotnet-maestro[bot] 1f15d60241
[blazor-wasm] Update dependencies from dotnet/arcade aspnet/Blazor (#17307)
* Update dependencies from https://github.com/aspnet/Blazor build 20191121.2

- Microsoft.AspNetCore.Blazor.Mono - 3.1.0-preview4.19571.2

* Update dependencies from https://github.com/aspnet/Blazor build 20191126.1

- Microsoft.AspNetCore.Blazor.Mono - 3.1.0-preview4.19576.1

* Update dependencies from https://github.com/aspnet/Blazor build 20191126.2

- Microsoft.AspNetCore.Blazor.Mono - 3.1.0-preview4.19576.2

* Add missing extensions feed

Seems like the feed with stable versions has been deleted in the updated. I've re-added it and that should fix the existing restore issues.

* Pass an empty array to entry point

Fixes https://github.com/aspnet/AspNetCore/issues/17419
2019-11-27 18:51:32 +00:00
Steve Sanderson 16195aaa3b Include .pdb files in blazor.boot.json to re-enable debugging 2019-11-27 14:59:54 +00:00
Steve Sanderson 99883719af Suppress msedge first run experience when debugging 2019-11-27 13:12:14 +00:00
Steve Sanderson 3579d8fca2 Fix swapped browser names. Fixes #16746 2019-11-27 13:12:14 +00:00
Steve Sanderson 46b95b2564 Fix wasm debugging when running on HTTPS. Fixes #17338 2019-11-27 13:12:14 +00:00
Pranav K 0c381d2402
Add some tests for hosted project building and publishing (#17398)
* Add some tests for hosted project building and publishing
2019-11-26 16:45:42 -08:00
Pranav K 3c6dc1c516
Try different MSBuild things to make build work (#17427)
Fixes https://github.com/aspnet/AspNetCore/issues/17418
2019-11-26 16:42:55 -08:00
John Luo 6c961ae4e2
Update branding for Blazor packages and update baseline (#17346)
* Disable baseline generation in CodeCheck
2019-11-25 16:17:22 -08:00
Javier Calvarro Nelson 4400467c15
[Blazor] Fixes publishing for standalone blazor-wasm applications (#17353)
* Updates the publish path on the static web assets to match the convention used by standalone blazor applications.
2019-11-25 23:16:29 +01:00
William Godbe ca948aae28
Merge pull request #17336 from dotnet-maestro-bot/merge/release/3.1-to-blazor-wasm
[automated] Merge branch 'release/3.1' => 'blazor-wasm'
2019-11-25 13:12:08 -08:00
Ryan Brandenburg 03dd93c473
Enable WASM debugging (#17162)
Changes needed so VS can connect to the Mono WebAssembly debugger via Chrome protocol
2019-11-25 13:00:24 -08:00
William Godbe 9cc3905c10
Don't ship blazor packages from release/3.1 (#17342) 2019-11-25 11:32:38 -08:00
Pranav K e862ce7cee
Use a task to launch the linker (#17313)
* Use a task to launch the linker


Fixes https://github.com/aspnet/AspNetCore/issues/17264
2019-11-25 10:09:06 -08:00
William Godbe ffb7b0d412
Merge branch 'blazor-wasm' into merge/release/3.1-to-blazor-wasm 2019-11-25 09:57:45 -08:00
Justin Kotalik c31f51e5c7 [3.1.x] Allow external startup hooks (#17116) 2019-11-23 10:06:25 -08:00
Pranav K e470aead3e Remove reference assembly for Blazor.HttpClient 2019-11-22 19:55:39 -08:00
Pranav K 3c06726d77 Move Mono.WebAssembly.Interop to blazor-wasm branch 2019-11-22 19:55:39 -08:00
Justin Kotalik 9fded4c4aa [3.1.x] Fix dotnet.exe process recovery after abnormal exit in… (#17103) 2019-11-22 15:50:31 -08:00
Chris Ross 6902b14471 [3.1.x] Backport HttpContext.Items fix (#17237) 2019-11-22 15:24:27 -08:00
Pranav K d6c88a36ff
More cleaning up Blazor.Build package (#17157)
* More cleaning up Blazor.Build package

* Clean up MonoRuntime targets
* Convert executables in to tasks
* Add tests
2019-11-22 09:54:20 -08:00
Pranav K 5bdf75f3e1
Use System.Reflection.Metadata to generate BootConfig (#17156)
* Use System.Reflection.Metadata to generate BootConfig

* Remove reference to Mono.Cecil
* Remove support for auto embedded css \ js
* Remove blazor.webassembly.js
2019-11-19 10:19:57 -08:00
Pranav K ff4791ea90
Use mono wasm method to invoke entry point (#17050) 2019-11-18 14:54:27 -08:00
Doug Bunting 92767967c0
Merge branch 'blazor-wasm' into merge/release/3.1-to-blazor-wasm 2019-11-16 12:43:11 -08:00
Ryan Nowak 8f8b5f55a9 Make constraint cache thread safe (#17146)
* Make constraint cache thread safe

Fixes: #17101

This changes the constraint cache to use ConcurrentDictionary. This code
is invoked in a multithreaded way in Blazor server resulting in internal
failures in dictionary.

Since this is a threading issue there's no good way to unit test it, but
I noticed we're missing tests in general for this class, so I added a
few for the caching behavior.

* PR feedback
2019-11-15 21:21:11 -08:00
William Godbe 19ca6e9a59
Merge pull request #16829 from aspnet/johluo/blazor-prerelease
Keep Blazor at pre-release for 3.1
2019-11-12 20:51:52 -08:00