Commit Graph

443 Commits

Author SHA1 Message Date
Nate McMaster 3fd8a97af2
Add targets to generate the list of shared framework assemblies from project property (#7510)
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'
2019-02-12 23:00:19 -08:00
Hao Kung 9ab72f6202
Skip flaky Components test on Helix (#7488) 2019-02-12 21:15:28 -08:00
Daniel Roth 2e1aa139f7
Update metadata for the Blazor VSIX (#7473) 2019-02-11 16:55:09 -08:00
Javier Calvarro Nelson dbf746d210
[Antiforgery][Components][CORS] Remove obsolete APIs (#7459)
#7325
#7319
#7324
2019-02-11 10:38:31 -08:00
Artak 7c9959934a Fixed a type reference in a doc comment.
Fixes #7416
2019-02-11 09:06:34 -08:00
Pranav K db7218b2fc
Consume Mono.WebAssembly.Interop from Extensions (#7290) 2019-02-08 17:37:36 -08:00
Nate McMaster cc065f0055
Produce a package with just reference assemblies for AspNetCore.App (#7355) 2019-02-07 19:47:52 -08:00
Hao Kung 26acbc3861
Reorganize helix files (#7353) 2019-02-07 16:27:48 -08:00
Hao Kung c9499e14e4
Run helix tests on master (#6728) 2019-02-07 09:20:08 -08:00
Javier Calvarro Nelson f456e3d153
[Components] [Fixes #6953, #7226]
* Moves the Synchronization context from the remote renderer to the base renderer.
* Removes all the locking from the base renderer.
2019-02-07 07:03:52 -08:00
Steve Sanderson 9ea678358c In Blazor templates, update survey links. Fixes #7130 2019-02-06 10:10:27 +00:00
Steve Sanderson a5915edada In Blazor Hosted template, use Json.NET. Fixes #7122 2019-02-06 10:10:27 +00:00
Steve Sanderson cc3b1641e3 Strong-name the dotnet-blazor CLI tool. Fixes #1501 2019-02-05 14:58:57 +00:00
Pranav K 2e54d6485b
Introduce CircuitHandler to handle circuit lifetime events (#6971)
Introduce CircuitHandler to handle circuit lifetime events

Partial fix to https://github.com/aspnet/AspNetCore/issues/6353
2019-02-04 10:53:01 -08:00
Pranav K 62d10bc08e
Changes per PR 2019-02-04 09:50:12 -08:00
Pranav K 92df79b270
Remove unused 2019-02-04 09:38:40 -08:00
Pranav K f1e70ec897
More PR changes 2019-02-04 09:38:40 -08:00
Pranav K cec47f05e2
Fix names and grammar 2019-02-04 09:38:40 -08:00
Pranav K e312d64194
[Design]: Introduce CircuitHandler to handle circuit lifetime events
Partial fix to https://github.com/aspnet/AspNetCore/issues/6353
2019-02-04 09:38:39 -08:00
James Newton-King 574be0d22c
Add readonly modifier to readonly structs (#7169) 2019-02-01 15:04:25 +13:00
Nate McMaster 6081fec894
Add new build.cmd/sh options for suppressing restore, NodeJS, setting target arch and OS name, and more (#7137)
Add new command line parameters for working with the project:

* `-NoBuild`, `-NoRestore` - these already existed, but users found it hard to discover this powershell syntax: '-build:$false'
* `-Arch`/`--arch` - set the target CPU architecture to build. Defaults to x64
* `--os-name` - on non-Windows builds, manually specify if the build should target Alpine. generic Linux, or MacOS
* Rename flags used to build specific project types. The pattern now is `--build-$(group)` or `--no-build-$(group)` (In PowerShell its `-Build$(Group)` or `-NoBuild$(Group). Example: -NoBuildJava

Changes to build definitions:
* Update the ci build definition to build all supported architectures
* Support publishing multiple artifacts per job

Other changes:
* `-NoBuild` implies `-NoRestore`
* Add new properties, `TargetArchitecture`, `TargetOsName`, and `TargetRuntimeIdentifier`
* Replace usages of `SharedFxRid` with these new properties
* To make `--no-build-nodejs` actually work, replaced Components.Browser.JS.csproj with Components.Browser.JS.npmproj
* Fix errors when building for win-arm on a clean machine
* Fix a few other project errors, like using the wrong syntax for DefaultItemExcludes, or using the wrong Platform value for x86
2019-01-31 15:47:47 -08:00
Pranav K ef1fc9e5c7 Put the BlazorExtension in artifacts 2019-01-29 15:41:11 -08:00
Pranav K 7a8b1d4461
Cleanup some infrastructure pieces in Components (#6970)
* Cleanup some infrastructure pieces in Components
2019-01-29 15:18:58 -08:00
Nikita Potapenko 0047b620b9 Fixed copyright element (#7087)
Summary of the changes:
 - Updated copyright symbol
 - Changed file encoding to UTF-8 without BOM

Fixes #7065
2019-01-29 10:19:21 -08:00
Nate McMaster ac04019e42
Remove obsolete build infrastructure (#6995)
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
2019-01-28 09:57:59 -08:00
Pranav K 16228c646a
Changes per PR 2019-01-25 13:53:07 -08:00
Pranav K c8319ece2a
Cleanup some infrastructure pieces in Components 2019-01-25 13:51:03 -08:00
Nate McMaster 2b6f5c28c4
Don't deploy VSIX when building in CI 2019-01-24 17:42:14 -08:00
Ryan Nowak f0fc598511 Resurrect Blazor VSIX (#6779)
* Remove Blazor.LanguageServices

The text-view-listener was the only thing here and it's not needed
anymore now that these features are build into our main VS payload.

We won't have any more code to put in this project because it's this
VSIX is pretty temporary.

* Remove reference to ProjectSystem

We don't need this reference, and it's got some breaking changes between
15 and 16 - rahter then mess with nuget sources for vs16 packages, I'm
just going to drop the dependency

* Remove unused cruft
* Target net472
* Add Blazor VSIX to build
* Add Extension to .sln
* Use AsyncPackage
* Update and streamline references
* Update manifest for 16.0
* Pack Templates before building VSIX
* Fix version of templates
2019-01-24 14:26:12 -08:00
Steve Sanderson a1d49e19b5 Revert feature that resets unspecified parameters to default(type). Fixes #6864 (#6931) 2019-01-22 16:16:07 -08:00
Steve Sanderson 4259fda63f Update condition for skipping custom restore sources in Blazor templates 2019-01-18 14:22:37 -08:00
Steve Sanderson 6c4a7c309d Fix symbol replacement in Blazor templates 2019-01-18 14:22:37 -08:00
Steve Sanderson a1700bc162 Remove incorrect Microsoft.NET.Sdk.Razor references from Blazor templates 2019-01-18 14:22:37 -08:00
Steve Sanderson 2c1c39cf07 Clean up templates 2019-01-18 14:22:37 -08:00
Steve Sanderson c901cc069d Rename IBlazorApplicationBuilder->IComponentsApplicationBuilder 2019-01-18 14:22:37 -08:00
Nate McMaster 922512a9fb
Convert the artifacts folder layout to match Arcade (#6850)
Changes:
* IsProductPackage => IsShippingPackage
* artifacts/$config/packages => artifacts/packages/$config
* packages/product => packages/Shipping
* packages/internal => packages/NonShipping
* Renamed MSBuild properties used for output folders
* Update build tools to use 2 spaces in global.json
2019-01-18 13:38:24 -08:00
Steve Sanderson cca71ad4d2 Add missing ProjectCapability for Razor Components 2019-01-17 20:54:46 -08:00
Steve Sanderson 694eaf793e
Temporary workaround for incorrect Blazor CLI package metadata generation (#6781) 2019-01-17 12:35:44 -08:00
Javier Calvarro Nelson 19b543e45f [Components] Support for prerrendering asynchronous components.
* Updates the IComponent interface to rename Init into Configure
* Updates the IComponent interface to change SetParameters for
  SetParametersAsync and make it return a Task that represents when the
  component is done applying the parameters and potentially triggering
  one or more renders.
* Updates ComponentBase SetParametersAsync to ensure that OnInit(Async)
  runs before OnParametersSet(Async).
* Introduces ParameterCollection.FromDictionary to generate a parameter
  collection from a dictionary of key value pairs.
* Introduces RenderComponentAsync on HtmlRenderer to support
  prerrendering of async components.
* Introduces RenderRootComponentAsync on the renderer to allow for
  asynchronous prerrendering of the root component.
2019-01-17 08:39:00 -08:00
Nate McMaster 5a70f5312f
Convert Components projects to use ProjectRef (#6698)
This addresses #4246 for src/Components/. A few other changes were necessary because components had been using stale dependencies.
2019-01-16 12:28:04 -08:00
Steve Sanderson 9020ab6386
No need to register .wasm media type since ASP.NET Core 2.2 (#6731) 2019-01-16 09:50:42 -08:00
Pranav K 86071c9db4
Add Components packages to shared fx (#6722)
* Add Components packages to shared fx

* Add Microsoft.AspNetCore.Components \ Microsoft.AspNetCore.Components.Browser to shared fx
* Update build to use Microsoft.InteropJS package produced from Extensions repo
* Remove some package references from components template

Fixes https://github.com/aspnet/AspNetCore/issues/6442
2019-01-15 18:05:42 -08:00
Pranav K d74833c2d7
Update Razor Sdk version (#6713)
* Update Razor Sdk version

* Use Razor SDK version with workaround for https://github.com/aspnet/AspNetCore/issues/6500
* Remove package reference to Razor SDK in template
2019-01-15 15:46:21 -08:00
Pranav K b56c589773
Dispose components on client disconnects (#6693)
* Dispose components on client disconnects
Fixes https://github.com/aspnet/AspNetCore/issues/4047
2019-01-15 14:52:40 -08:00
Steve Sanderson 0fff8bbd04 Fix signing error related to Microsoft.JSInterop.dll (#6705) 2019-01-15 10:00:28 -08:00
Steve Sanderson 864f76b2c0
Update Razor Components and Blazor templates (#6682) 2019-01-14 15:23:49 -08:00
Steve Sanderson cbbdeaefd4
Enforce correct sync context on render, and allow explicit dispatch to sync context. Fixes #5639 (#6604)
* Only use async marshalling to renderer sync context when necessary

Note that the lifecycle methods already take care of capturing the correct sync context, so continuations will already be serialized.
Avoiding an extra layer of asynchrony keeps the semantics of rendering closer to the WebAssembly cases, and will fix a range of intermittent errors in the wild.

* Add E2E test of triggering rendering from outside the sync context

* Actually throw if attempting to render from incorrect sync context

* Add "Dispatch" API

* Handle dispatch within dispatch. Also test Dispatch on WebAssembly.

* Avoid heap allocation

* Simplify E2E test

* Replace Dispatch() with Invoke() and InvokeAsync()

* Add E2E test to validate async execution order

* Clean up
2019-01-14 15:31:53 +00:00
Steve Sanderson 70cdf11f76
Make Razor Components apps not use Blazor build (#6562)
* Replace UseServerSideBlazor with UseRazorComponents, which doesn't require Blazor build artifacts

* Make UseRazorComponents serve blazor.server.js from embedded resource

... so we don't need a build step to put it on disk somewhere.

* Fix TestServer

* Update ComponentsApp not to use Blazor build targets

* Update ComponentsApp.App sample to use new build package

* Update string constant in test

* Rename blazor.*.js to components.*.js

* Ensure correct build order

* Update nav menu title in Components sample app

* Fix remaining paths

* Switch ComponentsApp.App to use Sdk="Microsoft.NET.Sdk.Razor"

* Update mono.cecil version

* CR: Replace FrameworkFilesProvider with EmbeddedFileProvider

* CR: Use ManifestEmbeddedFileProvider
2019-01-11 16:14:11 +00:00
Steve Sanderson 827ace6100
Factor WebAssembly debugging infrastructure out of Microsoft.AspNetCore.Components.Server (#6519)
* Add empty Blazor.Server project

* Move debugging middleware to Blazor.Server

* Use debugging middleware in Blazor standalone CLI

* Use debugging middleware in Blazor "hosted" sample

* Update artifacts.props
2019-01-11 10:29:43 +00:00
Steve Sanderson 8446b260d9
Split .Components.Build into .Blazor.Build+.Components.Build (#6538)
* Move Components.Build to blazor/src/. No content changes yet.

* Rename Components.Build to Blazor.Build and update file paths

* Move Components.Build.Test files. No content changes yet.

* Update contents in Blazor.Test

* Fix names of props/targets files

* Add minimal Components.Build package that just imports Razor targets and analyzer

* Make Blazor.Build depend on Components.Build and get Razor compilation targets from there

* Fix version of reference from .Blazor.Build to .Components.Build

* Fix signing error on local builds

* Update artifacts.props
2019-01-10 11:23:36 +00:00
Pranav K 6b0c0761a4 Avoid doing selenium 2019-01-09 17:17:22 -08:00
Ryan Nowak 74f1ccad0d Temporarily disable E2E component tests
These are causing hangs and timeouts on macOS
2019-01-08 21:47:24 -08:00
Ryan Nowak 5a75084826 Update SDK and remove workaround 2019-01-08 13:20:16 -08:00
Steve Sanderson 326e329018
Run components E2E tests in CI (#5158)
* Auto-install local copy of selenium-standalone on build

* Automatically start/stop selenium-standalone when running E2E tests

* Update after rebase

* Exclude node_modules from E2ETests project

* Avoid deadlocks

* Include E2E tests when running all tests in src/Components

* Be more forgiving about waiting for selenium-server to be ready

* Update usage of shared source file
2019-01-08 16:07:07 +00:00
Steve Sanderson 7cd7820274 Remove blazor template content projects from .sln. Can still run directly from commandline. 2019-01-07 10:17:41 +00:00
Ryan Nowak 9003c3cd75 PR Feedback
From:
2cb3964411..45adea0c6d (diff-9328b73f3a66921c3ef3fa8a4ce90031)
2019-01-04 13:38:32 -08:00
Ryan Nowak b1f4a7bafd Delete baseline files 2019-01-02 00:32:09 -08:00
Ryan Nowak 0dd1bf8cd3 Make the tests pass
- Remove baseline tests. Those live with tooling
- Unskip tests that should have been fixed years ago
- Fix rendering test infrastructure
2019-01-02 00:32:09 -08:00
Ryan Nowak bdb5982dbd Remove Blazor Compiler 2019-01-02 00:32:09 -08:00
Ryan Nowak 9e89a69a78 Update RazorCompilation.targets for new SDK 2019-01-02 00:32:09 -08:00
Ryan Nowak 4424594c9b Allow build to specify Razor SDK version 2019-01-02 00:32:09 -08:00
Ryan Nowak 688ab7fc49 Fix dotnet-blazor serve
This wasn't properly forwarding the base path to the configuration.
Basically nothing was setting RemainingArguments. We have a test project
that sets the base path, but it was never used when debugging locally.

I also cleaned this up a bit and changed it to use dotnet exec. This
allow you to debug the CLI and related server pipeline, but has the
tradeoff of not rebuilding.
2019-01-02 00:32:09 -08:00
Ryan Nowak 8cfa8ea64a chmod +x on build.sh 2019-01-02 00:32:09 -08:00
alenros 92adad62e3 Cleanup doc comment grammar and some debugging leftovers (#6065) 2018-12-20 17:39:02 -08:00
Nate McMaster c3beb1f9b1
build.cmd/sh changes (#5958)
Update the build scripts to support building subfolders or subgroups of projects

* Add build scripts for ci
* Remove obsolete scripts
* Add flags like --test and --pack to control running just test or packaging
* Add flags like --managed and --native to control building sub-types of projects
* Remove KoreBuild bootstrapper flags
* Update to extensions 3.0.0-preview.18619.1 (needed to get a fix for aspnet/Extensions#815 to make this change work on MSBuild.exe)
2018-12-20 16:52:15 -08:00
Ajay Bhargav Baaskaran ffec555118 Added missed files 2018-12-18 15:35:38 -08:00
Ajay Bhargav Baaskaran eeabafa68f Merge branch 'temp' into ajbaaska/merge-master 2018-12-18 14:44:25 -08:00
Ajay Bhargav Baaskaran 2a696f6a1c Merge branch 'release/2.2' 2018-12-18 12:50:01 -08:00
Nate McMaster 335c9be7b4
Update the artifacts directory organization and simplify publishing targets (#5701)
This simplifies the way that we publish files to our network drop share.

Changes:
* Instead of explicitly listing every file that needs to publish, use directories to classify packages and artifacts into different categories.
* Add documentation for the expected layout of artifacts/
* Remove the need for static analysis to determine which packages go to which project
* Add the MSBuild property "IsProductPackage" to .csproj files which ship as a package to NuGet.org.
2018-12-18 11:40:13 -08:00
Steve Sanderson ceb1c8e562
Refactor Components.Browser package (#5166)
* Add empty Microsoft.AspNetCore.Blazor project

* Reorganize Blazor-specific parts of .Components.Browser into Microsoft.AspNetCore.Blazor. Delete redundant Components-CSharp template (it now ships from Templating).

* Fix unit test

* Add missing assembly description

* Move WebAssemblyBlazorApplicationBuilder

* Rename BrowserHttpMessageHandler -> WebAssemblyHttpMessageHandler

* Delete obsolete BrowserServiceProvider. Rename BrowserRenderer -> WebAssemblyRenderer.

* Rename BrowserUriHelper -> WebAssemblyUriHelper

* Remove redundant ActivateMonoJSRuntime helper

* Fix namespace

* Remove redundant MicrosoftNETCoreAppPackageVersion override

* Update test namespaces
2018-12-18 12:32:57 +00:00
Nate McMaster 0cd79cc4c1
Remove unused VS dependencies and old versions of .NET Core from dependencies (#5317)
As a result of removing Razor's VS projects and upgrading all projects to netcoreapp3.0, we no longer need dependency variable for .NET Core 1.x and 2.x and Visual Studio packages.

Changes:
* Remove 'StandardTestTfm'
* Remove variables for .NET Core 1.0, 1.1, 2.0, 2.1, and 2.2
* Remove VSIX variables
* Stop generating 'branding.props' - this hasn't been used in a while and is no longer needed
2018-12-17 16:28:33 -08:00
Javier Calvarro Nelson 436b5461ad
[Components] Create a renderer to render components into HTML (#4463)
* Adds an HtmlRenderer to Microsoft.AspNetCore.Components
 * It renders the component into a list of strings.
 * It only handles synchronous rendering.
2018-12-14 21:28:05 +01:00
Steve Sanderson 6187e628af
linking to some existing docs (#4592) 2018-12-14 18:50:57 +00:00
Steve Sanderson ec9676f51e
Make component parameter analyzer allow public getters. Imported from Blazor PR 1702. (#4594) 2018-12-14 18:50:45 +00:00
Steve Sanderson d30c407dd0
Support IServiceProviderFactory in WebAssemblyHostBuilder (imported from Blazor PR 1623) (#4785) 2018-12-14 17:37:14 +00:00
Steve Sanderson 343208331d
Replace AssignToProperties with SetParameterProperties, which also clears unspecified parameter properties (imported from Blazor PR 1108) (#4797) 2018-12-14 17:07:07 +00:00
Steve Sanderson 3757908b14
Fallback for Components router (imported from Blazor PR 1534) (#4794) 2018-12-14 17:06:47 +00:00
Steve Sanderson e768a78c2b
Ensure ComponentBase async lifecycle methods return non-null task (imported from Blazor PR 1620) (#4790) 2018-12-14 17:06:30 +00:00
Steve Sanderson 8a9df6c873
HttpClientJsonExtensions better handling for failed requests (imported from Blazor PR 1660) (#4788) 2018-12-14 17:06:03 +00:00
Steve Sanderson 93127b39e8
Overload UriHelper to forceLoad the page (imported from Blazor PR 1154) (#4786) 2018-12-14 17:05:45 +00:00
Steve Sanderson 8fbb9fb0e6
Add support for binding decimal? double? float? long? int? bool? (imported from Blazor PR 1658) (#4600) 2018-12-14 17:05:22 +00:00
Steve Sanderson 1e404a5acf
fix for dispose (#4596) 2018-12-14 17:04:41 +00:00
Steve Sanderson 71bcac06ad
fixing type of property Detail based on standard. (#4595) 2018-12-14 17:04:26 +00:00
Steve Sanderson 5c1fbe1af7
Run Components on netcoreapp3.0 (#4391) 2018-12-05 14:46:26 +00:00
Steve Sanderson c7d6364900 Enable src/Components to build (#4367)
Fix aspnet/AspNetCore-Internal#1443
2018-12-03 16:38:28 -08:00
Nate McMaster 26dfce1f3c
Disable building src/Components and fix its code signing configuration (#4299) 2018-11-28 15:29:25 -08:00
Steve Sanderson 53fbdb8243
Update Components readme (#4282) 2018-11-28 10:32:57 +00:00
Steve Sanderson cef3782c3b Components merge CR feedback 2018-11-27 22:12:24 +00:00
Steve Sanderson 42c1ceb3cf Fix package output path 2018-11-27 22:11:50 +00:00
Steve Sanderson b4dbbdcf35 Components merge CR feedback 2018-11-27 18:58:34 +00:00
Steve Sanderson 16c11b4c87 Integrate src/Components into mondorepo build system 2018-11-27 17:17:34 +00:00
Steve Sanderson 523fa285f2 Rename BlazorServerSide-CSharp template to Components-CSharp 2018-11-27 11:16:07 +00:00
Steve Sanderson 07e2d5420c Move all Components sources into src/Components 2018-11-27 11:03:30 +00:00